/* 広告掲載料金表（ads/price/）
   目的: docs/style-guide.md（和紙×墨×丹色）に準拠し、表は紙面らしい罫線と余白で整理する。
*/

:root {
  /* Tokens (style-guide.md 基準) */
  --color-bg: #f5f0e8;
  --color-text: #1a1a1a;
  --color-accent: #c53d43;
  --color-accent-gold: #b8860b;
  --color-border: #d0c8b8;
  --color-web-navy: #1b3a5c;
  --color-estate-green: #2d5a3d;

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

  --section-padding: 72px;
  --transition-speed: 220ms;
}

.np-ads-price {
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.01em;
}

.np-ads-price [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
  will-change: opacity, transform;
}

.np-ads-price .is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.np-ads-price .np-ads-price-inner {
  max-width: 960px;
  margin: 0 auto;
  padding-inline: 10px;
}

.np-ads-price .np-ads-price-inner {
  position: relative;
}

.np-ads-price .np-ads-price-inner::before {
  content: "";
  position: absolute;
  inset: -22px 0;
  background:
    radial-gradient(
      900px 320px at 18% 10%,
      rgba(255, 255, 255, 0.46),
      transparent 58%
    ),
    radial-gradient(
      720px 280px at 78% 22%,
      rgba(197, 61, 67, 0.08),
      transparent 62%
    ),
    linear-gradient(180deg, rgba(26, 26, 26, 0.02), transparent 24%),
    repeating-linear-gradient(
      90deg,
      rgba(208, 200, 184, 0.1) 0px,
      rgba(208, 200, 184, 0.1) 1px,
      transparent 1px,
      transparent 12px
    );
  border: 1px solid rgba(208, 200, 184, 0.65);
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 1040px) {
  .np-ads-price .np-ads-price-inner::before {
    inset: -18px 0;
  }
}

.np-ads-price .np-ads-price-inner > * {
  position: relative;
  z-index: 1;
}

.np-ads-price .np-rate-section {
  padding-top: 0;
  margin-top: 72px;
}

.np-ads-price .np-rate-section.is-filtered-out {
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 220ms ease,
    transform 220ms ease;
}

.np-ads-price .np-rate-filters {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.np-ads-price .np-filter-btn {
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 9px 12px 8px;
  border-radius: 8px;
  border: 1px solid rgba(208, 200, 184, 0.95);
  background:
    radial-gradient(120px 40px at 18% 20%, rgba(255, 255, 255, 0.65), transparent 60%),
    repeating-linear-gradient(
      90deg,
      rgba(208, 200, 184, 0.10) 0px,
      rgba(208, 200, 184, 0.10) 1px,
      transparent 1px,
      transparent 10px
    ),
    rgba(255, 255, 255, 0.38);
  color: rgba(26, 26, 26, 0.84);
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(26, 26, 26, 0.05),
    0 6px 14px rgba(26, 26, 26, 0.06);
  position: relative;
  transition:
    background var(--transition-speed),
    border-color var(--transition-speed),
    transform var(--transition-speed),
    filter var(--transition-speed),
    box-shadow var(--transition-speed);
}

.np-ads-price .np-filter-btn::before {
  content: "";
  position: absolute;
  inset: 6px 6px auto 6px;
  height: 2px;
  border-radius: 999px;
  background: rgba(26, 26, 26, 0.10);
  pointer-events: none;
  opacity: 0.8;
}

.np-ads-price .np-filter-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(26, 26, 26, 0.05),
    0 10px 22px rgba(26, 26, 26, 0.10);
}

.np-ads-price .np-filter-btn:active {
  transform: translateY(0);
  box-shadow:
    0 1px 0 rgba(26, 26, 26, 0.04),
    0 4px 10px rgba(26, 26, 26, 0.08);
  filter: saturate(1.02);
}

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

.np-ads-price .np-filter-btn.is-active {
  color: rgba(245, 240, 232, 0.98);
  border-color: rgba(26, 26, 26, 0.10);
  box-shadow:
    0 1px 0 rgba(26, 26, 26, 0.06),
    0 12px 26px rgba(26, 26, 26, 0.14);
}

.np-ads-price .np-filter-btn.is-active::before {
  background: rgba(245, 240, 232, 0.45);
  opacity: 1;
}

.np-ads-price .np-filter-btn.is-active[data-filter="flyer"] {
  background: rgba(197, 61, 67, 0.92);
  border-color: rgba(197, 61, 67, 0.65);
}

.np-ads-price .np-filter-btn.is-active[data-filter="web"] {
  background: rgba(27, 58, 92, 0.92);
  border-color: rgba(27, 58, 92, 0.65);
}

.np-ads-price .np-filter-btn.is-active[data-filter="jobs"] {
  background: rgba(184, 134, 11, 0.92);
  border-color: rgba(184, 134, 11, 0.65);
}

.np-ads-price .np-filter-btn.is-active[data-filter="estate"] {
  background: rgba(45, 90, 61, 0.92);
  border-color: rgba(45, 90, 61, 0.65);
}

.np-ads-price .np-filter-btn.is-active[data-filter="all"] {
  background: rgba(26, 26, 26, 0.86);
  border-color: rgba(26, 26, 26, 0.5);
}

.np-ads-price .np-rate-cards {
  display: none;
}

.np-ads-price .np-rate-section {
  scroll-margin-top: 110px;
}

.np-ads-price .np-card-rate:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(26, 26, 26, 0.1);
}

.np-ads-price .np-card-rate-toggle:focus-visible {
  outline: 2px solid rgba(197, 61, 67, 0.35);
  outline-offset: 4px;
}

.np-ads-price .np-card-rate-chevron i {
  transition: transform 220ms ease;
}

.np-ads-price
  .np-card-rate-toggle[aria-expanded="true"]
  .np-card-rate-chevron
  i {
  transform: rotate(180deg);
}

.np-ads-price .np-card-rate-chevron {
  display: none;
}

.np-ads-price .np-card-rate-details {
  max-height: none;
}

.np-ads-price .np-rate-section:first-of-type {
  margin-top: 56px;
}

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

.np-ads-price .np-rate-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 6px;
}

.np-ads-price .np-rate-head-main {
  min-width: 0;
}

.np-ads-price .np-rate-orn {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: -4px;
}

.np-ads-price .np-rate-orn .np-rule {
  display: block;
  height: 1px;
  width: min(360px, 100%);
  background: linear-gradient(
    90deg,
    rgba(208, 200, 184, 0.2),
    rgba(208, 200, 184, 0.95),
    rgba(208, 200, 184, 0.2)
  );
}

.np-ads-price .np-rate-vert {
  writing-mode: vertical-rl;
  letter-spacing: 0.24em;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 12px;
  color: rgba(26, 26, 26, 0.62);
  border: 1px solid rgba(208, 200, 184, 0.75);
  background: rgba(245, 240, 232, 0.65);
  padding: 10px 8px;
  line-height: 1;
  user-select: none;
}

.np-ads-price .np-rate-caption {
  caption-side: top;
  text-align: left;
  padding: 10px 16px 12px;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.02em;
  color: rgba(26, 26, 26, 0.86);
}

.np-ads-price .np-table-wrap {
  border: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.26);
  overflow: hidden;
}

.np-ads-price .np-rate-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.np-ads-price .np-rate-table thead th {
  background: rgba(26, 26, 26, 0.92);
  color: rgba(245, 240, 232, 0.98);
  font-weight: 900;
  letter-spacing: 0.02em;
  text-align: center;
  padding: 14px 16px;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  white-space: nowrap;
}

.np-ads-price .np-rate-table thead th:last-child {
  border-right: 0;
}

.np-ads-price .np-rate-table tbody th,
.np-ads-price .np-rate-table tbody td {
  padding: 12px 16px;
  border-top: 1px solid rgba(208, 200, 184, 0.9);
  border-right: 1px solid rgba(208, 200, 184, 0.65);
  vertical-align: middle;
}

.np-ads-price .np-rate-table tbody tr > *:last-child {
  border-right: 0;
}

.np-ads-price .np-rate-table tbody tr:nth-child(odd) {
  background: rgba(245, 240, 232, 0.52);
}

.np-ads-price .np-rate-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.34);
}

.np-ads-price .np-rate-table tbody tr:hover {
  background: rgba(197, 61, 67, 0.06);
  transition: background 200ms ease;
}

.np-ads-price .np-rate-table tbody th {
  text-align: left;
  font-weight: 700;
  color: rgba(26, 26, 26, 0.92);
}

.np-ads-price .np-rate-table tbody td {
  text-align: right;
}

.np-ads-price .np-rate-table tbody td:last-child {
  color: var(--color-accent-gold);
  font-weight: 800;
}

.np-ads-price .np-rate-table tbody tr.is-submission {
  background: rgba(26, 26, 26, 0.03);
}

.np-ads-price .np-rate-table tbody tr.is-submission td {
  text-align: left;
  color: rgba(26, 26, 26, 0.78);
}

.np-ads-price .np-rate-notes {
  margin-top: 12px;
  color: rgba(26, 26, 26, 0.62);
  font-size: 13px;
  line-height: 1.7;
}

.np-ads-price .np-rate-notes p {
  margin: 6px 0 0;
}

.np-ads-price .np-rate-notes p:first-child {
  margin-top: 0;
}

/* CTA */
.np-ads-price .np-rate-cta {
  margin-top: 80px;
  border-top: 1px solid var(--color-border);
  padding-top: 54px;
}

.np-ads-price .np-rate-cta-inner {
  border: 1px solid var(--color-border);
  background:
    radial-gradient(
      840px 260px at 22% 24%,
      rgba(255, 255, 255, 0.46),
      transparent 58%
    ),
    linear-gradient(135deg, rgba(197, 61, 67, 0.08), rgba(184, 134, 11, 0.06)),
    rgba(255, 255, 255, 0.22);
  padding: 22px 20px;
}

.np-ads-price .np-rate-cta-title {
  margin: 0;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: 0.02em;
  font-size: 20px;
}

.np-ads-price .np-rate-cta-lead {
  margin: 10px 0 0;
  color: rgba(26, 26, 26, 0.72);
  max-width: none;
}

.np-ads-price .np-rate-cta-actions {
  margin-top: 16px;
}

/* ボタン（広告代行ページ .np-agency .np-btn と同系統） */
.np-ads-price .np-btn {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 11px 14px;
  border: 1px solid rgba(208, 200, 184, 0.9);
  background: rgba(255, 255, 255, 0.32);
  color: rgba(26, 26, 26, 0.92);
  text-decoration: none;
  transition:
    transform 220ms ease,
    background 220ms ease,
    border-color 220ms ease;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  border-radius: 2px;
}

.np-ads-price .np-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(26, 26, 26, 0.28);
}

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

.np-ads-price .np-btn--accent {
  background: rgba(197, 61, 67, 0.12);
  border-color: rgba(197, 61, 67, 0.5);
}

.np-ads-price .np-btn--accent:hover {
  background: rgba(197, 61, 67, 0.16);
  border-color: rgba(197, 61, 67, 0.65);
}

/* Breakpoint: 768px 이하（모바일） - カード方式 */
@media (max-width: 768px) {
  /* 768px↓ 横スクロール防止（このページ範囲のみ） */
  .np-ads-price {
    overflow-x: clip;
    overflow-y: visible;
  }

  /* 内部スクロールコンテナ化を防止 */
  .np-ads-price .np-container,
  .np-ads-price .np-ads-price-inner {
    overflow-y: visible;
    max-height: none;
  }

  .np-ads-price .np-ads-price-inner {
    max-width: 100%;
    padding-inline: 10px;
    min-width: 0;
  }

  .np-ads-price .np-ads-price-inner::before {
    inset: -18px 0;
  }

  .np-ads-price .np-rate-section {
    margin-top: 56px;
  }

  .np-ads-price .np-rate-head {
    grid-template-columns: 1fr;
  }

  .np-ads-price .np-rate-vert {
    display: none;
  }

  .np-ads-price .np-table-wrap {
    display: none;
  }

  /* フィルター行が長い場合は横スクロール（ページ全体は横スクロールさせない） */
  .np-ads-price .np-rate-filters {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .np-ads-price .np-rate-filters::-webkit-scrollbar {
    display: none;
  }

  .np-ads-price .np-filter-btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .np-ads-price .np-rate-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    min-width: 0;
  }

  .np-ads-price .np-card-rate {
    --cat: var(--color-accent);
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    background:
      radial-gradient(
        900px 260px at 18% 18%,
        rgba(255, 255, 255, 0.55),
        transparent 58%
      ),
      radial-gradient(
        760px 220px at 78% 30%,
        rgba(197, 61, 67, 0.06),
        transparent 62%
      ),
      repeating-linear-gradient(
        90deg,
        rgba(208, 200, 184, 0.12) 0px,
        rgba(208, 200, 184, 0.12) 1px,
        transparent 1px,
        transparent 14px
      ),
      rgba(255, 255, 255, 0.3);
    overflow: hidden;
    border: 1px solid rgba(208, 200, 184, 0.75);
    transition:
      transform 300ms ease,
      box-shadow 300ms ease,
      background 220ms ease;
    max-width: 100%;
  }

  .np-ads-price .np-card-rate[style*="--cat-key:web"] {
    --cat: var(--color-web-navy);
  }
  .np-ads-price .np-card-rate[style*="--cat-key:jobs"] {
    --cat: var(--color-accent-gold);
  }
  .np-ads-price .np-card-rate[style*="--cat-key:estate"] {
    --cat: var(--color-estate-green);
  }

  .np-ads-price .np-card-rate-topbar {
    height: 3px;
    background: var(--cat);
  }

  .np-ads-price .np-card-rate-body {
    display: flex;
    align-items: stretch;
    min-width: 0;
  }

  .np-ads-price .np-card-rate-vert {
    width: 30px;
    display: grid;
    place-items: center;
    writing-mode: vertical-rl;
    background: var(--cat);
    color: rgba(255, 255, 255, 0.95);
    font-family: var(--font-serif);
    font-weight: 900;
    letter-spacing: 0.18em;
    font-size: 12px;
    user-select: none;
  }

  .np-ads-price .np-card-rate-content {
    flex: 1;
    min-width: 0;
  }

  .np-ads-price .np-card-rate-toggle {
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    padding: 18px 18px 14px;
    cursor: pointer;
    font: inherit;
    color: inherit;
  }

  .np-ads-price .np-card-rate-toggle:active {
    background: rgba(26, 26, 26, 0.02);
  }

  .np-ads-price .np-card-rate-headline {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
    min-width: 0;
  }

  .np-ads-price .np-card-rate-primary {
    flex: 1;
    font-family: var(--font-serif);
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 0.02em;
    color: rgba(26, 26, 26, 0.92);
    min-width: 0;
    line-break: strict;
    overflow-wrap: anywhere;
  }

  .np-ads-price .np-card-rate-total {
    display: grid;
    gap: 2px;
    justify-items: end;
    flex: none;
    max-width: 58%;
  }

  .np-ads-price .np-card-rate-total-label {
    font-size: 11px;
    color: rgba(26, 26, 26, 0.58);
    letter-spacing: 0.06em;
  }

  .np-ads-price .np-card-rate-total-val {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    color: var(--cat);
    text-align: right;
    overflow-wrap: anywhere;
  }

  .np-ads-price .np-card-rate-total--muted {
    font-size: 13px;
    color: rgba(26, 26, 26, 0.72);
    font-style: italic;
    font-weight: 700;
  }

  .np-ads-price .np-card-rate-discount {
    margin-top: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
  }

  .np-ads-price .np-card-rate-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(208, 200, 184, 0.85);
    background: rgba(245, 240, 232, 0.72);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: rgba(26, 26, 26, 0.78);
  }

  .np-ads-price .np-card-rate-badge.is-muted {
    opacity: 0.75;
  }

  .np-ads-price .np-card-rate-discount-val {
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: var(--cat);
    letter-spacing: 0.01em;
  }

  .np-ads-price .np-card-rate-chevron {
    position: absolute;
    right: 16px;
    top: 18px;
    font-size: 12px;
    color: rgba(26, 26, 26, 0.62);
    transition: transform 220ms ease;
  }

  .np-ads-price .np-card-rate-toggle {
    position: relative;
    padding-right: 44px;
  }

  .np-ads-price .np-card-rate-details {
    max-height: none;
    overflow: hidden;
    transition: max-height 260ms ease;
  }

  .np-ads-price .np-card-rate-divider {
    border-top: 1px dotted rgba(208, 200, 184, 0.95);
    margin-top: 10px;
  }

  .np-ads-price .np-card-rate-grid {
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
    padding: 0 18px 16px;
    min-width: 0;
  }

  .np-ads-price .np-card-rate-grid-item {
    min-width: 0;
  }

  .np-ads-price .np-card-rate-grid-item dd {
    overflow-wrap: anywhere;
  }

  .np-ads-price .np-card-rate-grid-item dt {
    font-size: 11px;
    color: rgba(26, 26, 26, 0.58);
    letter-spacing: 0.06em;
    font-weight: 800;
  }

  .np-ads-price .np-card-rate-grid-item dd {
    margin: 4px 0 0;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    color: rgba(26, 26, 26, 0.88);
  }

  .np-ads-price .np-card-rate-submission-note {
    padding: 12px 18px 16px;
    color: rgba(26, 26, 26, 0.7);
  }

  .np-ads-price .np-card-rate.is-submission {
    background:
      radial-gradient(
        860px 240px at 18% 18%,
        rgba(255, 255, 255, 0.46),
        transparent 58%
      ),
      repeating-linear-gradient(
        90deg,
        rgba(208, 200, 184, 0.16) 0px,
        rgba(208, 200, 184, 0.16) 1px,
        transparent 1px,
        transparent 14px
      ),
      rgba(26, 26, 26, 0.02);
  }
}

/* Breakpoint: 480px 이하（모바일） */
@media (max-width: 480px) {
  .np-ads-price .np-card-rate-chevron {
    display: inline-flex;
  }

  .np-ads-price .np-card-rate-vert {
    display: none;
  }

  .np-ads-price .np-card-rate-toggle {
    padding: 14px 14px 12px;
    padding-right: 40px;
  }

  .np-ads-price .np-card-rate-grid {
    grid-template-columns: 1fr;
    padding: 0 14px 14px;
    gap: 10px;
  }
}
