/* RPG数秘コラム — 記事ページ共通スタイル */
:root {
  --purple: #56136f;
  --purple-2: #32104f;
  --deep-purple: #1a0628;
  --red: #ef1717;
  --gold: #ffd36a;
  --cream: #fff8e9;
  --paper: #fffaf4;
  --ink: #2b2330;
  --muted: #6c6170;
  --line: rgba(255, 211, 106, 0.55);
  --max: 760px;
}

.article-page {
  background: #fdfcfe;
  color: var(--ink);
  line-height: 1.85;
}

.article-page a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-page a:hover {
  color: var(--red);
}

.article-header {
  position: relative;
  padding: 48px 0 36px;
  color: #fff;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 153, 241, 0.3), transparent 26%),
    linear-gradient(160deg, #13051d 0%, #31104c 45%, #1a0628 100%);
}

.article-header-inner {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.article-logo {
  align-self: flex-start;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 28px;
  padding: 9px 15px 7px;
  border-radius: 12px;
  color: var(--gold-2);
  border: 1px solid rgba(255, 223, 146, 0.78);
  background: linear-gradient(180deg, rgba(76, 28, 112, 0.94), rgba(31, 10, 50, 0.96));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 244, 210, 0.22);
}

.article-header .article-logo,
.article-header .article-logo:hover {
  color: var(--gold-2);
  text-decoration: none;
}

.article-logo strong {
  font-size: 1.2rem;
  line-height: 1.1;
  font-family: "Noto Serif JP", serif;
}

.article-logo span {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
}

.article-breadcrumb {
  font-size: 0.78rem;
  opacity: 0.8;
  margin-bottom: 16px;
}

.article-breadcrumb a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
}

.article-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(255, 211, 106, 0.18);
  border: 1px solid rgba(255, 211, 106, 0.45);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.article-header .article-tag {
  color: var(--gold);
}

.article-header h1 {
  margin: 0 0 14px;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.45rem, 4.2vw, 2rem);
  line-height: 1.45;
  font-weight: 700;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.82rem;
  opacity: 0.85;
}

.article-hero-img {
  width: min(920px, calc(100% - 32px));
  margin: -20px auto 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(38, 8, 57, 0.24);
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #ddd0f0, #c8b8e8);
}

.article-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-body-wrap {
  padding: 40px 0 64px;
}

.article-body {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.article-body h2 {
  margin: 2.4em 0 0.8em;
  padding-bottom: 0.4em;
  border-bottom: 2px solid var(--line);
  font-family: "Noto Serif JP", serif;
  font-size: 1.25rem;
  color: var(--purple-2);
}

.article-body h3 {
  margin: 1.6em 0 0.6em;
  font-size: 1.05rem;
  color: var(--purple);
}

.article-body p,
.article-body li {
  font-size: 0.95rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.4em;
}

.article-body li + li {
  margin-top: 0.4em;
}

.article-lead {
  font-size: 1.02rem;
  font-weight: 500;
  color: #3d3344;
}

.article-note {
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.88rem;
}

.article-note--master {
  margin-top: 1.2em;
  background: linear-gradient(135deg, #f3ebff, var(--cream));
  border-color: rgba(86, 19, 111, 0.25);
}

.article-char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
  margin: 1.4em 0 2em;
}

.article-char-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 10px 14px;
  border-radius: 14px;
  background: var(--paper);
  border: 1px solid rgba(86, 19, 111, 0.12);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.article-char-card:hover {
  transform: translateY(-3px);
  border-color: var(--line);
  box-shadow: 0 10px 24px rgba(38, 8, 57, 0.12);
  color: inherit;
}

.article-char-card img {
  width: 100%;
  max-width: 120px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  margin-bottom: 8px;
}

.article-char-no {
  display: inline-block;
  min-width: 1.8em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--cream);
  border: 1px solid var(--line);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.04em;
}

.article-char-card h3 {
  margin: 8px 0 4px;
  font-size: 0.92rem;
  color: var(--purple-2);
}

.article-char-card p {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}

.article-char-card--master {
  background: linear-gradient(160deg, #faf5ff 0%, var(--paper) 100%);
  border-color: rgba(255, 211, 106, 0.65);
}

.article-char-card--master .article-char-no {
  background: rgba(255, 211, 106, 0.25);
  border-color: rgba(255, 211, 106, 0.8);
}

.article-calc {
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--paper);
  border: 1px solid rgba(86, 19, 111, 0.15);
  font-family: "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.9;
  overflow-x: auto;
}

.article-table-wrap {
  overflow-x: auto;
  margin: 1.2em 0;
}

.article-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.article-table th,
.article-table td {
  padding: 10px 12px;
  border: 1px solid rgba(86, 19, 111, 0.15);
  text-align: left;
}

.article-table th {
  background: var(--cream);
  font-weight: 700;
  white-space: nowrap;
}

.article-table tr:nth-child(even) td {
  background: rgba(247, 240, 255, 0.5);
}

.article-cta {
  margin: 2.4em 0;
  padding: 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f7f0ff, var(--cream));
  border: 1px solid var(--line);
  text-align: center;
}

.article-cta p {
  margin: 0 0 16px;
  font-weight: 700;
  color: var(--purple-2);
}

.article-cta .btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.article-cta .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border: 2px solid transparent;
}

.article-cta .btn-red {
  background: var(--red);
  color: #fff;
}

.article-cta .btn-outline {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple);
}

.article-cta .btn-purple {
  background: var(--purple);
  color: #fff;
}

.article-disclaimer-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 48px;
}

.article-disclaimer {
  margin: 0;
  padding-top: 1.2em;
  border-top: 1px solid rgba(86, 19, 111, 0.12);
  font-size: 0.78rem;
  color: var(--muted);
}

.article-related {
  margin-top: 0;
  border-top: 1px solid rgba(86, 19, 111, 0.1);
}

.article-related .container {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.article-related .articles-head h2 {
  margin: 0 0 8px;
  font-family: "Noto Serif JP", serif;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  color: var(--purple-2);
}

.article-related .article-grid {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.article-related .article-card {
  text-decoration: none;
  color: inherit;
}

.article-related .article-card:hover {
  color: inherit;
}

.article-related .article-body {
  width: auto;
  max-width: none;
  margin: 0;
  padding: 16px 18px 20px;
}

.article-related .article-body h3 {
  margin: 0;
  padding: 0;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: "Noto Serif JP", serif;
  line-height: 1.55;
  color: var(--ink);
}

.article-footer {
  padding: 24px 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--muted);
  border-top: 1px solid rgba(86, 19, 111, 0.1);
}

@media (max-width: 640px) {
  .article-header {
    padding: 36px 0 28px;
  }

  .article-hero-img {
    margin-top: -12px;
    border-radius: 12px;
  }
}
