/*
Theme Name: NM Owned Media
Theme URI: https://nextmedia.team/
Author: ネクストメディア株式会社
Description: Lightweight owned media theme for ネクストメディア株式会社 standard builds.
Version: 0.1.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: nm-owned-media
*/

:root {
  --nm-ink: #5C5C5C;
  --nm-muted: #8a8a8a;
  --nm-soft: #fff;
  --nm-paper: #F4F4F2;
  --nm-line: #d8d8d5;
  --nm-accent: #2AADA8;
  --nm-accent-soft: #C8EEEC;
  --nm-accent-2: #E8A820;
  --nm-accent-2-soft: #F7E4B0;
  --nm-accent-3: #8B62CC;
  --nm-accent-3-soft: #DDD0F3;
  --nm-radius: 4px;
  --nm-content: 1120px;
  --nm-readable: 760px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--nm-paper);
  color: var(--nm-ink);
  font-family: "Hiragino Sans", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
  font-size: 15px;
  line-height: 1.78;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

a:hover {
  color: var(--nm-accent);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.nm-site {
  min-height: 100vh;
}

.nm-container {
  width: min(100% - 40px, var(--nm-content));
  margin-inline: auto;
}

.nm-header {
  border-bottom: 1px solid var(--nm-line);
  background: rgba(244, 244, 242, 0.96);
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.nm-header__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.nm-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  text-decoration: none;
}

.nm-brand:hover .nm-brand__name {
  color: var(--nm-accent);
}

.nm-brand__name {
  color: #424242;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.1;
}

.nm-brand__tagline {
  color: var(--nm-muted);
  font-size: 12px;
  line-height: 1.4;
}

.nm-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  font-weight: 700;
}

.nm-nav ul {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nm-nav a {
  text-decoration: none;
}

.nm-nav a:hover {
  color: var(--nm-accent);
}

.nm-mobile-category-nav {
  display: none;
}

.nm-external-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nm-external-link::after {
  content: "";
  width: 0.95em;
  height: 0.95em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='currentColor'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M15%203h6v6'/%3E%3Cpath%20d='M10%2014%2021%203'/%3E%3Cpath%20d='M18%2013v6a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2V8a2%202%200%200%201%202-2h6'/%3E%3C/svg%3E") center / contain no-repeat;
}

.nm-main {
  padding-block: 34px 76px;
}

.nm-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  padding-block: 26px 44px;
  border-bottom: 1px solid var(--nm-line);
}

.nm-hero__eyebrow {
  margin: 0 0 14px;
  color: var(--nm-accent-3);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nm-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.12;
  letter-spacing: 0;
}

.nm-hero__lead {
  max-width: 680px;
  margin: 20px 0 0;
  color: var(--nm-muted);
  font-size: 15px;
}

.nm-category-panel {
  align-self: end;
  border: 1px solid var(--nm-line);
  border-radius: var(--nm-radius);
  padding: 22px;
  background: #fff;
}

.nm-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 700;
}

.nm-section-title::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--nm-accent);
}

.nm-category-list,
.nm-author-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nm-category-list a,
.nm-author-list a,
.nm-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--nm-line);
  border-radius: 999px;
  padding: 5px 11px;
  background: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}

.nm-card .nm-category-list a,
.nm-article .nm-category-list a,
.nm-related .nm-category-list a {
  min-height: 28px;
  border: 1px solid #d8d8d5;
  border-radius: 6px;
  padding: 5px 10px;
  background: #fff;
  color: var(--nm-ink);
  font-size: 12px;
  font-weight: 400;
}

.nm-card .nm-category-list a:hover,
.nm-article .nm-category-list a:hover,
.nm-related .nm-category-list a:hover {
  border-color: var(--nm-accent);
  background: var(--nm-accent-soft);
  color: #3f6866;
}

.nm-category-list a:hover,
.nm-author-list a:hover,
.nm-chip:hover {
  border-color: var(--nm-accent);
  background: var(--nm-accent-soft);
  color: #3f6866;
}

.nm-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 22px;
  color: var(--nm-muted);
  font-size: 12px;
  font-weight: normal;
}

.nm-breadcrumb a {
  color: var(--nm-accent);
  text-decoration: none;
}

.nm-breadcrumb a:hover {
  color: var(--nm-accent-3);
}

.nm-breadcrumb span:not(:last-child)::after,
.nm-breadcrumb a:not(:last-child)::after {
  content: "/";
  margin-left: 6px;
  color: var(--nm-line);
}

.nm-category-panel .nm-category-list,
.nm-widget .nm-category-list,
.nm-author-list {
  display: grid;
  gap: 8px;
}

.nm-category-panel .nm-category-list a,
.nm-widget .nm-category-list a,
.nm-author-list a {
  justify-content: space-between;
  width: 100%;
  border-radius: var(--nm-radius);
}

.nm-layout {
  display: block;
  margin-top: 42px;
}

.nm-post-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
}

.nm-card {
  --nm-card-shadow: var(--nm-accent-soft);
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
  position: relative;
  overflow: visible;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 var(--nm-card-shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}

.nm-card::after {
  content: none;
}

.nm-card:hover {
  transform: translate(8px, 8px);
}

.nm-card:hover::after {
  content: none;
}

.nm-card:hover {
  box-shadow: 0 0 0 var(--nm-card-shadow);
}

.nm-card--site,
.nm-card--site-improvement,
.category-site-improvement,
.category-site-kaizen,
.category-site {
  --nm-card-shadow: var(--nm-accent-soft);
}

.nm-card--ads,
.nm-card--advertising,
.category-advertising,
.category-ads {
  --nm-card-shadow: var(--nm-accent-2-soft);
}

.nm-card--content,
.nm-card--content-planning,
.category-content-planning,
.category-content {
  --nm-card-shadow: var(--nm-accent-3-soft);
}

.nm-card:first-child {
  padding-top: 0;
}

.nm-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #1f1f1f;
  border-radius: 6px 6px 0 0;
  background: var(--nm-soft);
}

.nm-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nm-card__placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 18px;
  color: var(--nm-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.nm-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 22px;
  border-radius: 0 0 6px 6px;
  background: #fff;
}

.nm-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 9px;
  color: var(--nm-muted);
  font-size: 12px;
  font-weight: 400;
}

.nm-card__body > .nm-meta,
.nm-card__meta {
  order: 4;
  margin: 16px 0 0;
}

.nm-card__title {
  order: 1;
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: 0;
}

.nm-card__title a {
  text-decoration: none;
}

.nm-card__title a:hover {
  color: var(--nm-accent);
  text-decoration: none;
}

.nm-card__excerpt {
  order: 2;
  margin: 12px 0 0;
  color: var(--nm-muted);
  font-size: 13px;
}

.nm-card__footer {
  order: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 18px;
}

.nm-authors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.nm-author-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
}

.nm-author-mini:hover {
  color: var(--nm-accent);
}

.nm-author-mini img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.nm-avatar {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--nm-ink);
  color: var(--nm-paper);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.nm-avatar--large {
  width: 72px;
  height: 72px;
  font-size: 24px;
}

.nm-sidebar {
  display: none;
  align-content: start;
  gap: 30px;
}

.nm-page-header + .nm-layout .nm-sidebar {
  margin-top: -42px;
}

.nm-widget {
  border-top: 2px solid #5f5f5f;
  padding-top: 16px;
}

.nm-ranking {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: ranking;
}

.nm-ranking li {
  counter-increment: ranking;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
}

.nm-ranking li::before {
  content: counter(ranking, decimal-leading-zero);
  color: var(--nm-accent-2);
  font-size: 12px;
  font-weight: 900;
}

.nm-ranking a {
  font-size: 13px;
  font-weight: normal;
  line-height: 1.5;
  text-decoration: none;
}

.nm-ranking a:hover {
  color: var(--nm-accent);
}

.nm-author-list a {
  display: grid;
  gap: 2px;
}

.nm-author-role {
  color: var(--nm-muted);
  font-size: 12px;
  font-weight: 500;
}

.nm-page-header {
  max-width: 840px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--nm-line);
}

.nm-page-header h1 {
  margin: 0;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.22;
}

.nm-page-header p {
  margin: 18px 0 0;
  color: var(--nm-muted);
}

.nm-article {
  max-width: 820px;
  margin-inline: auto;
  border: 1px solid var(--nm-line);
  border-radius: 8px;
  padding: 34px 38px;
  background: #fff;
}

.nm-article__header {
  padding-bottom: 30px;
  border-bottom: 1px solid var(--nm-line);
}

.nm-article__title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1.36;
  letter-spacing: 0;
}

.nm-article__categories {
  margin-top: 26px;
}

.nm-article__header .nm-meta {
  margin: 22px 0 0;
}

.nm-article__thumb {
  margin-top: 28px;
  overflow: hidden;
  border-radius: var(--nm-radius);
  border: 1px solid var(--nm-line);
}

.nm-content {
  margin-top: 38px;
  font-size: 16px;
}

.nm-article__header + .nm-content {
  margin-top: 34px;
}

.nm-content a:not(.wp-block-button__link):not(.nm-related__thumb):not(.nm-related__title):not(.nm-author-mini):not(.nm-chip) {
  color: var(--nm-accent);
  font-weight: normal;
  text-decoration-line: underline;
  text-decoration-color: rgba(42, 173, 168, 0.42);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}

.nm-content a:not(.wp-block-button__link):not(.nm-related__thumb):not(.nm-related__title):not(.nm-author-mini):not(.nm-chip):hover {
  color: #238f8b;
  text-decoration-color: var(--nm-accent);
}

.nm-content h2,
.nm-content h3,
.nm-content h4 {
  scroll-margin-top: 96px;
  line-height: 1.45;
  letter-spacing: 0;
}

.nm-content h2 {
  margin-top: 2.7em;
  padding-top: 0.75em;
  border-top: 2px solid var(--nm-ink);
  font-size: 25px;
}

.nm-content h3 {
  margin-top: 2em;
  font-size: 20px;
}

.nm-content p,
.nm-content ul,
.nm-content ol,
.nm-content blockquote,
.nm-content figure {
  margin-block: 1.15em;
}

.nm-content > ul,
.nm-content > ol {
  padding-left: 1.6em;
}

.nm-content blockquote {
  margin-inline: 0;
  border-left: 4px solid var(--nm-accent);
  padding: 12px 0 12px 18px;
  color: var(--nm-muted);
}

.nm-content pre {
  overflow-x: auto;
  border: 1px solid var(--nm-line);
  border-radius: var(--nm-radius);
  padding: 18px;
  background: #fff;
  color: #4d4d4d;
  font-size: 13px;
  line-height: 1.7;
}

.nm-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.nm-content .wp-block-image {
  margin-block: 1.6em;
}

.nm-image-placeholder {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  border: 1px solid var(--nm-line);
  border-radius: 8px;
  background: var(--nm-soft);
  color: var(--nm-muted);
  font-size: 13px;
  font-weight: 700;
}

.nm-content figcaption {
  margin-top: 10px;
  color: var(--nm-muted);
  font-size: 13px;
  line-height: 1.7;
}

.nm-faq {
  display: grid;
  gap: 12px;
  margin-block: 1.4em;
}

.nm-faq details {
  border: 1px solid var(--nm-line);
  border-radius: 8px;
  background: #fff;
}

.nm-faq summary {
  cursor: pointer;
  padding: 16px 18px;
  color: var(--nm-ink);
  font-weight: 700;
}

.nm-faq p {
  margin: 0;
  border-top: 1px solid var(--nm-line);
  padding: 14px 18px 18px;
}

.nm-related {
  max-width: 820px;
  margin: 54px auto 0;
  border-top: 2px solid #5f5f5f;
  padding-top: 20px;
}

.nm-related .nm-section-title {
  font-weight: 700;
}

.nm-related__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nm-related__list > li {
  display: flex;
  min-width: 0;
}

.nm-related__item {
  --nm-card-shadow: var(--nm-accent-soft);
  display: flex;
  min-width: 0;
  width: 100%;
  flex-direction: column;
  position: relative;
  overflow: visible;
  border: 1px solid #1f1f1f;
  border-radius: 8px;
  background: #fff;
  box-shadow: 8px 8px 0 var(--nm-card-shadow);
  transition: box-shadow .18s ease, transform .18s ease;
}

.nm-related__item::after {
  content: none;
}

.nm-related__item:hover {
  transform: translate(8px, 8px);
}

.nm-related__item:hover::after {
  content: none;
}

.nm-related__item:hover {
  box-shadow: 0 0 0 var(--nm-card-shadow);
}

.nm-related__item--site {
  --nm-card-shadow: var(--nm-accent-soft);
}

.nm-related__item--ads {
  --nm-card-shadow: var(--nm-accent-2-soft);
}

.nm-related__item--content {
  --nm-card-shadow: var(--nm-accent-3-soft);
}

.nm-related__thumb {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  border: 0;
  border-bottom: 1px solid #1f1f1f;
  border-radius: 6px 6px 0 0;
  background: var(--nm-soft);
  color: var(--nm-muted);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.nm-related__thumb:hover {
  background: var(--nm-accent-soft);
  color: #3f6866;
}

.nm-related__body,
.nm-related__item > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 18px;
  border-radius: 0 0 6px 6px;
  background: #fff;
}

.nm-related__title {
  order: 1;
  display: inline-block;
  margin-top: 6px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.55;
  text-decoration: none;
}

.nm-related__title:hover {
  color: var(--nm-accent);
}

.nm-related__excerpt {
  order: 2;
  margin: 10px 0 0;
  color: var(--nm-muted);
  font-size: 13px;
  line-height: 1.7;
}

.nm-related__body > .nm-meta,
.nm-related__item > div > .nm-meta {
  order: 4;
  margin: 16px 0 0;
}

.nm-related .nm-card__footer {
  justify-content: space-between;
  margin-top: auto;
}

.nm-style-section {
  max-width: 1120px;
  margin: 64px auto 0;
  border-top: 2px solid #5f5f5f;
  padding-top: 22px;
}

.nm-style-section > h2 {
  margin: 0;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.35;
}

.nm-style-section > p {
  max-width: 720px;
  margin: 14px 0 30px;
  color: var(--nm-muted);
  font-size: 15px;
  line-height: 1.8;
}

.nm-style-section > h3 {
  margin: 42px 0 18px;
  font-size: 20px;
}

.nm-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 30;
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nm-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #4c4c4c;
  font-size: 0;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(92, 92, 92, 0.14);
}

.nm-to-top::before {
  content: "↑";
  display: block;
  margin-top: -1px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.nm-to-top:hover {
  border-color: var(--nm-accent);
  color: var(--nm-accent);
}

.nm-content .is-style-nm-lead,
.is-style-nm-lead {
  color: #4d4d4d;
  font-size: 1.08em;
  font-weight: 700;
  line-height: 1.95;
}

.nm-content .is-style-nm-note,
.nm-content .is-style-nm-alert,
.nm-content .is-style-nm-cta,
.is-style-nm-note,
.is-style-nm-alert,
.is-style-nm-cta {
  border-radius: var(--nm-radius);
  padding: 24px;
  margin-block: 28px;
}

.nm-content .is-style-nm-note,
.is-style-nm-note {
  border: 1px solid var(--nm-line);
  background: var(--nm-accent-soft);
}

.nm-content .is-style-nm-alert,
.is-style-nm-alert {
  border: 1px solid var(--nm-accent-2);
  background: var(--nm-accent-2-soft);
}

.nm-content .is-style-nm-cta,
.is-style-nm-cta {
  border: 2px solid var(--nm-accent);
  background: #fff;
}

.nm-content .is-style-nm-note h2,
.nm-content .is-style-nm-note h3,
.nm-content .is-style-nm-alert h2,
.nm-content .is-style-nm-alert h3,
.nm-content .is-style-nm-cta h2,
.nm-content .is-style-nm-cta h3 {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.nm-content .is-style-nm-check-list,
.is-style-nm-check-list {
  padding-left: 1.6em;
  list-style: none;
}

.nm-content .is-style-nm-check-list li,
.is-style-nm-check-list li {
  position: relative;
  padding-left: 0;
}

.nm-content .is-style-nm-check-list li::before,
.is-style-nm-check-list li::before {
  content: "✓";
  position: absolute;
  left: -1.55em;
  width: 1em;
  text-align: center;
  color: var(--nm-accent);
  font-weight: 900;
}

.nm-toc {
  border-top: 2px solid #5f5f5f;
  border-bottom: 1px solid var(--nm-line);
  padding: 18px 0;
}

.nm-content .nm-toc h2 {
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  font-size: 15px;
}

.nm-toc ol {
  margin: 0;
}

.nm-toc a {
  font-weight: normal;
  text-decoration: none;
}

.nm-content .nm-toc a {
  color: inherit;
  font-weight: normal !important;
  text-decoration: none !important;
}

.nm-toc a:hover {
  color: var(--nm-accent);
}

.nm-toc li {
  font-weight: 400;
}

.nm-point-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 1.7em;
  margin-bottom: 1.9em;
}

.nm-point-grid.wp-block-columns {
  column-gap: 24px;
  row-gap: 24px;
}

.nm-point {
  height: 100%;
  border: 1px solid var(--nm-line);
  border-radius: var(--nm-radius);
  padding: 24px 22px 22px;
  background: #fff;
}

.nm-point-grid .wp-block-column {
  margin: 0;
}

.nm-content .nm-point h3,
.nm-point h3 {
  margin: 12px 0 0;
  font-size: 19px;
  line-height: 1.45;
}

.nm-content .nm-point p:not(.nm-point__number),
.nm-point p:not(.nm-point__number) {
  margin: 12px 0 0;
  color: var(--nm-muted);
  font-size: 14px;
  line-height: 1.75;
}

.nm-point__number {
  margin: 0;
  color: var(--nm-accent-3);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.nm-marker,
.nm-content mark {
  background: linear-gradient(transparent 62%, var(--nm-accent-2-soft) 62%);
  color: inherit;
  padding-inline: 0.08em;
  font-weight: 700;
}

.nm-steps {
  display: grid;
  gap: 14px;
}

.nm-step {
  border-left: 4px solid var(--nm-accent);
  padding: 16px 0 16px 20px;
  background: linear-gradient(90deg, rgba(42, 173, 168, 0.12), rgba(42, 173, 168, 0));
}

.nm-content .nm-step h3,
.nm-step h3 {
  margin-top: 0;
  font-size: 18px;
}

.nm-compare-table {
  overflow-x: auto;
}

.nm-compare-table table {
  min-width: 640px;
  border-collapse: collapse;
}

.nm-compare-table th,
.nm-compare-table td {
  border: 1px solid var(--nm-line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.nm-compare-table th {
  background: var(--nm-soft);
  font-weight: 900;
}

.wp-block-button__link {
  border-radius: var(--nm-radius);
  background: var(--nm-accent);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.wp-block-button__link:hover {
  background: #238f8b;
  color: #fff;
  box-shadow: 0 10px 22px rgba(42, 173, 168, 0.22);
}

.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--nm-accent);
  border: 1px solid var(--nm-accent);
}

.is-style-outline .wp-block-button__link:hover {
  background: var(--nm-accent-soft);
  color: #3f6866;
}

.nm-author-box {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  margin-top: 46px;
  border-top: 1px solid var(--nm-line);
  padding-top: 24px;
}

.nm-author-box img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.nm-author-box h2 {
  margin: 0;
  font-size: 18px;
}

.nm-author-box p {
  margin: 8px 0 0;
  color: var(--nm-muted);
  font-size: 14px;
}

.nm-pagination {
  display: flex;
  justify-content: center;
  margin-top: 38px;
}

.nm-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nm-pagination a,
.nm-pagination span {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--nm-line);
  border-radius: 50%;
  padding: 0;
  text-decoration: none;
}

.nm-pagination__arrow {
  font-size: 15px;
}

.nm-content .nm-pagination a,
.nm-content .nm-pagination span {
  color: inherit;
  font-weight: normal;
  text-decoration: none !important;
}

.nm-pagination .current {
  background: var(--nm-ink);
  color: var(--nm-paper);
}

.nm-content .nm-pagination .current {
  color: var(--nm-paper);
}

.nm-pagination a:hover {
  border-color: var(--nm-accent);
  background: var(--nm-accent-soft);
  color: #3f6866;
  text-decoration: underline;
}

.nm-content .nm-pagination a:hover {
  text-decoration: underline !important;
}

.nm-pagination .nm-pagination__arrow:hover {
  border-color: var(--nm-ink);
  background: var(--nm-ink);
  color: var(--nm-paper);
  text-decoration: none;
}

.nm-content .nm-pagination .nm-pagination__arrow:hover {
  color: var(--nm-paper);
  text-decoration: none !important;
}

.nm-footer {
  border-top: 1px solid var(--nm-line);
  padding-block: 30px;
  color: var(--nm-muted);
  font-size: 13px;
}

.nm-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.nm-footer a {
  text-decoration: none;
}

.nm-footer a:hover {
  color: var(--nm-accent);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px) {
  .nm-hero,
  .nm-layout {
    grid-template-columns: 1fr;
  }

  .nm-post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nm-card__thumb {
    max-width: none;
  }

  .nm-related__item {
    display: flex;
  }

  .nm-page-header + .nm-layout .nm-sidebar {
    margin-top: 0;
  }

  .nm-point-grid {
    grid-template-columns: 1fr;
  }

  .nm-header__inner {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-block: 14px;
  }

  .nm-nav,
  .nm-nav ul {
    flex-wrap: wrap;
    gap: 10px 14px;
  }
}

@media (max-width: 760px) {
  .nm-to-top {
    right: 14px;
    bottom: 14px;
    width: 40px;
    height: 40px;
    box-shadow: 0 8px 18px rgba(92, 92, 92, 0.16);
  }

  .nm-to-top::before {
    font-size: 19px;
  }

  .nm-header {
    position: static;
    border-bottom: 0;
  }

  .nm-header__inner {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-block: 14px;
  }

  .nm-nav {
    display: none;
  }

  .nm-mobile-category-nav {
    position: sticky;
    top: 0;
    z-index: 19;
    display: block;
    border-top: 1px solid var(--nm-line);
    border-bottom: 1px solid var(--nm-line);
    background: rgba(244, 244, 242, 0.97);
    backdrop-filter: blur(10px);
  }

  .nm-mobile-category-nav .nm-container {
    width: 100%;
  }

  .nm-mobile-category-nav .nm-category-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    padding: 10px 12px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .nm-mobile-category-nav .nm-category-list::-webkit-scrollbar {
    display: none;
  }

  .nm-mobile-category-nav .nm-category-list li {
    flex: 0 0 auto;
  }

  .nm-mobile-category-nav .nm-category-list a {
    width: auto;
    min-height: 32px;
    border: 0;
    border-radius: 999px;
    padding: 6px 13px;
    background: transparent;
    color: #4f4f4f;
    white-space: nowrap;
  }

  .nm-mobile-category-nav .nm-category-list a:hover {
    background: #fff;
  }

  .nm-content h2,
  .nm-content h3,
  .nm-content h4 {
    scroll-margin-top: 62px;
  }

  .nm-content .nm-toc {
    position: sticky;
    top: 0;
    z-index: 18;
    width: 100vw;
    max-width: none;
    margin-right: calc(50% - 50vw);
    margin-left: calc(50% - 50vw);
    padding: 0;
    border-top: 1px solid var(--nm-line);
    border-bottom: 1px solid var(--nm-line);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 18px rgba(92, 92, 92, 0.08);
    backdrop-filter: blur(10px);
  }

  .nm-content .nm-toc h2 {
    margin: 0;
    padding: 12px max(18px, calc((100vw - var(--nm-readable)) / 2 + 18px));
    color: var(--nm-ink);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
  }

  .nm-content .nm-toc h2::after {
    content: "開く";
    float: right;
    color: var(--nm-accent);
    font-size: 12px;
    font-weight: 700;
  }

  .nm-content .nm-toc.is-open h2::after {
    content: "閉じる";
  }

  .nm-content .nm-toc ol {
    display: none;
    margin: 0;
    padding: 0 max(18px, calc((100vw - var(--nm-readable)) / 2 + 18px)) 12px;
    list-style: none;
  }

  .nm-content .nm-toc.is-open ol {
    display: grid;
    gap: 8px;
  }

  .nm-content .nm-toc li {
    min-width: 0;
  }

  .nm-content .nm-toc a {
    display: flex;
    align-items: center;
    min-height: 38px;
    border: 1px solid var(--nm-line);
    border-radius: var(--nm-radius);
    padding: 8px 10px;
    background: #fff;
    color: var(--nm-muted);
    font-size: 12px;
    line-height: 1.4;
  }

  .nm-content .nm-toc a:hover {
    border-color: var(--nm-accent);
    background: var(--nm-accent-soft);
    color: #3f6866;
  }
}

@media (max-width: 560px) {
  .nm-container {
    width: min(100% - 24px, var(--nm-content));
  }

  .nm-main {
    padding-block: 28px 52px;
  }

  .nm-article {
    padding: 24px 18px;
  }

  .nm-hero {
    gap: 28px;
  }

  .nm-card {
    gap: 0;
    padding-block: 0;
  }

  .nm-post-list {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .nm-related__item {
    gap: 0;
  }

  .nm-related__thumb {
    width: 100%;
    max-width: none;
  }

  .nm-compare-table {
    width: calc(100vw - 24px);
    margin-left: 50%;
    transform: translateX(-50%);
  }

  .nm-compare-table table {
    min-width: 560px;
  }

  .nm-compare-table th,
  .nm-compare-table td {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.65;
  }

  .nm-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nm-author-box {
    grid-template-columns: 1fr;
  }

  .nm-footer__inner {
    flex-direction: column;
  }

  .nm-footer__inner nav {
    order: 1;
  }

  .nm-footer__inner > div {
    order: 2;
  }
}
