.rm-article {
  --base-pink: #ff008c;
  --base-pink-light: #fff5fb;
  --base-pink-lighter: #ffe6f5;
  --accent-blue: #4facfe;
  --accent-green: #00b894;
  --accent-yellow: #ffd166;
  --accent-red: #ff4b5c;
  --text-main: #2c3e50;
  --text-secondary: #5a6c7d;
  --bg-gray: #f8f9fa;
  --border-color: #e8ecef;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "ヒラギノ角ゴ ProN", "Hiragino Kaku Gothic ProN", "メイリオ", Meiryo,
    sans-serif;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 60px;
  line-height: 1.85;
  color: var(--text-main);
  background: #fff;
  font-size: 16px;
}

/* box-sizing reset */
.rm-article,
.rm-article * {
  box-sizing: border-box;
}

@media (min-width: 768px) {
  .rm-article {
    padding: 48px 32px 80px;
    font-size: 17px;
  }
}

/* =========================
   Headings
========================= */
.rm-article h1,
.rm-article h2,
.rm-article h3,
.rm-article h4 {
  margin: 48px 0 24px;
  font-weight: 700;
  line-height: 1.4;
}

.rm-article h1 {
  font-size: 1.9rem;
}

.rm-article h2 {
  position: relative;
  padding: 16px 24px 16px 28px !important;
  border-radius: var(--radius-md) !important;
  background: var(--base-pink) !important;
  box-shadow: var(--shadow-md) !important;
  font-size: 1.4rem;
  margin-top: 64px;
  color: #fff !important;
}

.rm-article h2::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 5px;
  height: 50%;
  background: #fff;
  border-radius: 999px;
  transform: translateY(-50%);
  opacity: 0.8;
}

.rm-article h3 {
  position: relative;
  padding-left: 20px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--base-pink-lighter);
  font-size: 1.25rem;
  border-left: none;
  border-top: none;
}

.rm-article h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 24px;
  background: var(--base-pink);
  border-radius: 3px;
}

.rm-article h4 {
  font-size: 1.1rem;
  padding-left: 14px;
  border-left: 4px solid var(--accent-blue);
  margin-top: 32px;
  border-top: none;
  border-bottom: none;
}

/* =========================
   Text / Lists
========================= */
.rm-article p {
  margin: 0 0 20px;
  color: var(--text-secondary);
}

.rm-article ul,
.rm-article ol {
  margin: 16px 0 24px 0;
}

.rm-article ul li,
.rm-article ol li {
  margin: 10px 0;
  line-height: 1.8;
  color: var(--text-secondary);
}

.rm-article ul li {
  list-style: none;
  position: relative;
  padding-left: 1.5em;
}

.rm-article ul li::before {
  content: "●";
  position: absolute;
  left: 0;
  top: 0.2em;
  font-size: 0.6rem;
  color: var(--base-pink);
}

.rm-article ol {
  counter-reset: numbered;
}

.rm-article ol > li {
  list-style: none;
  position: relative;
  padding-left: 2em;
}

.rm-article ol > li::before {
  counter-increment: numbered;
  content: counter(numbered);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.5em;
  height: 1.5em;
  background: var(--base-pink);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
}

/* =========================
   Emphasis / Markers
========================= */
.rm-article .highlight {
  background: #fff4a3;
  padding: 0 4px;
  font-weight: 600;
}
.rm-article .marker-yellow {
  background: linear-gradient(transparent 60%, #fff9c4 60%);
  font-weight: 600;
}
.rm-article .marker-pink {
  background: linear-gradient(transparent 60%, #ffd6ec 60%);
  font-weight: 600;
}
.rm-article .marker-blue {
  background: linear-gradient(transparent 60%, #cfe9ff 60%);
  font-weight: 600;
}
.rm-article .marker-green {
  background: linear-gradient(transparent 60%, #d4edda 60%);
  font-weight: 600;
}
.rm-article .marker-orange {
  background: linear-gradient(transparent 60%, #ffe4c4 60%);
  font-weight: 600;
}

.rm-article .marker-bold-yellow {
  background: linear-gradient(transparent 60%, #fff59d 60%);
  font-weight: 700;
}

.rm-article .marker-bold-pink {
  background: linear-gradient(transparent 60%, #ffcce0 60%);
  font-weight: 700;
}

.rm-article .underline-thick {
  border-bottom: 4px solid #fff176;
  font-weight: 600;
  padding-bottom: 2px;
}

.rm-article .underline-wave {
  text-decoration: underline wavy var(--base-pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  font-weight: 600;
}

.rm-article .emphasis,
.rm-article strong {
  font-weight: 700;
  color: var(--base-pink);
}

/* =========================
   Links
========================= */
.rm-article a {
  color: var(--base-pink);
  font-weight: 600;
  text-decoration: none;
}

.rm-article a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* =========================
   Tables
========================= */
.rm-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 0.95rem;
}

.rm-article th,
.rm-article td {
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  vertical-align: top;
}

.rm-article th {
  background: #f5f7fb;
  width: 26%;
}

/* =========================
   Boxes / UI Parts
========================= */
.rm-article .box-column,
.rm-article .box-tips,
.rm-article .box-memo,
.rm-article .box-caution,
.rm-article .box-warning,
.rm-article .box-success {
  margin: 28px 0;
  padding: 24px 20px 20px;
  border-radius: var(--radius-md);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.toc-title::after {
  content: none;
}

a span.initial-nav-text {
  color: var(--rmv-text-secondary);
  text-decoration-line: none;
}

a span.initial-nav-icon {
  color: var(--rmv-text-secondary);
  text-decoration-line: none;
}

a.internal-link {
  color: #0066cc;
  text-decoration-line: underline;
}

.initial-nav {
  background: linear-gradient(135deg, #fff, #f8f9fa);
  border-radius: 12px;
  margin-bottom: 5px;
}

.initial-nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 15px;
  columns: var(--rmv-text-secondary);
}

.initial-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  padding: 15px 10px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: white;
  border: 2px solid #e0e0e0;
  position: relative;
  overflow: hidden;
}

.initial-nav-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(191, 0, 0, 0.15);
  border-color: #bf0000;
  background: linear-gradient(135deg, #fff, #fff5f5);
}

.initial-nav-item.active {
  background: linear-gradient(135deg, #bf0000, #d32f2f);
  color: white;
  border-color: #bf0000;
  box-shadow: 0 6px 20px rgba(191, 0, 0, 0.3);
}

.initial-nav-icon {
  font-size: 20px;
  margin-bottom: 5px;
  display: block;
}

.initial-nav-text {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

.floating-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to right, #fff5f5, #ffe9e9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.3s ease-in-out;
  display: none;
}

.floating-nav.show {
  transform: translateY(0);
}

.nav-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 12px;
  max-width: 800px;
  margin: 0 auto;
  background: transparent;
}

@media (max-width: 768px) {
  .floating-nav {
    display: block;
  }

  .nav-item {
    font-size: 11px;
    font-weight: bold;
    padding: 6px 4px;
  }

  .nav-item::before {
    height: 2px;
  }
}

/* =========================
   Points Table – Campaign Style
   ========================= */

/* テーブル全体 */
.rm-article table.points-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

/* ヘッダー */
.rm-article table.points-table thead th {
  background: var(--rmv-base-pink);
  color: #fff;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

/* 通常セル */
.rm-article table.points-table td {
  text-align: center;
  line-height: 1.6;
}

/* プラン名・補足は左寄せ */
.rm-article table.points-table td:first-child,
.rm-article table.points-table td:nth-child(5) {
  text-align: left;
  font-weight: 600;
  color: var(--rmv-text-main);
}

/* ポイント列 */
.rm-article table.points-table td.points {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rmv-base-pink);
}

/* 打ち消し線（旧ポイント） */
.rm-article table.points-table .strike {
  text-decoration: line-through;
  color: #999;
  font-weight: 600;
}

/* 強調行（MNPなど） */
.rm-article table.points-table tr.highlight td {
  background: #fff0f7 !important;
  font-weight: 700;
}

/* 行ホバー */
.rm-article table.points-table tbody tr:hover td {
  background: #ffe3ef !important;
}

/* セル内のpタグ調整 */
.rm-article table.points-table td p {
  margin: 4px 0;
}

/* =========================
   Mobile (横スクロール対応)
   ========================= */

@media (max-width: 768px) {
  .rm-article figure.wp-block-table {
    overflow-x: auto;
  }

  .rm-article table.points-table {
    min-width: 720px;
    font-size: 0.9rem;
  }

  .rm-article table.points-table thead th,
  .rm-article table.points-table td {
    padding: 10px 8px;
  }
}
