/*
 * RAPIDE CMS 公開サイトの標準スタイル。テーマは --rp-* の変数を上書きして見た目を変える
 * （管理画面に色や書体の設定は持たない）。本文の部品（rp-prose / rp-btn / rp-table …）はどのテーマでも同じ名前。
 */
:root {
  --rp-color-text: #1a1a1a;
  --rp-color-muted: #6b7280;
  --rp-color-bg: #ffffff;
  --rp-color-surface: #f7f7f8;
  --rp-color-line: #e5e5e7;
  --rp-color-accent: #111111;
  --rp-color-accent-text: #ffffff;
  --rp-color-link: #1d4ed8;
  --rp-font-body: "Noto Sans JP", system-ui, -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --rp-font-heading: var(--rp-font-body);
  --rp-radius: 10px;
  --rp-container: 1120px;
  --rp-prose: 760px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--rp-font-body); color: var(--rp-color-text); background: var(--rp-color-bg); line-height: 1.8; -webkit-font-smoothing: antialiased; }
img, picture, video, iframe { max-width: 100%; height: auto; display: block; }
a { color: var(--rp-color-link); }
h1, h2, h3, h4 { font-family: var(--rp-font-heading); line-height: 1.4; }
.rp-skip { position: absolute; left: -9999px; }
.rp-skip:focus { left: 16px; top: 16px; z-index: 100; background: #fff; padding: 8px 12px; }
.rp-container { width: 100%; max-width: var(--rp-container); margin: 0 auto; padding: 0 20px; }
.rp-main { min-height: 60vh; }
.rp-section { padding: 48px 20px 64px; }
.rp-section__title { font-size: clamp(24px, 3vw, 32px); margin: 0 0 24px; }
.rp-lead { color: var(--rp-color-muted); }
.rp-center { text-align: center; }
.rp-code { font-size: 64px; font-weight: 800; margin: 0; color: var(--rp-color-line); }
.rp-notice { background: #fff7d6; padding: 10px 14px; border-radius: 8px; }

/* ヘッダー・フッター */
.rp-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--rp-color-line); }
.rp-header__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.rp-brand { font-weight: 800; font-size: 18px; text-decoration: none; color: inherit; }
.rp-nav { margin-left: auto; }
.rp-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; align-items: center; }
.rp-nav a { color: inherit; text-decoration: none; font-size: 15px; }
.rp-nav a[aria-current="page"] { font-weight: 700; }
.rp-nav li { position: relative; }
.rp-nav li ul { display: none; position: absolute; top: 100%; left: 0; background: #fff; border: 1px solid var(--rp-color-line); border-radius: 8px; padding: 8px; flex-direction: column; align-items: stretch; gap: 0; min-width: 180px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); }
.rp-nav li:hover > ul, .rp-nav li:focus-within > ul { display: flex; }
.rp-nav li ul a { display: block; padding: 6px 10px; }
.rp-nav-toggle { display: none; }
.rp-header__search input { height: 36px; border: 1px solid var(--rp-color-line); border-radius: 999px; padding: 0 14px; font: inherit; font-size: 14px; width: 180px; }
.rp-footer { border-top: 1px solid var(--rp-color-line); padding: 40px 0; margin-top: 64px; color: var(--rp-color-muted); font-size: 14px; }
.rp-footer__nav { list-style: none; padding: 0; display: flex; gap: 16px; flex-wrap: wrap; }
.rp-footer__nav a { color: inherit; }

/* トップ・カード */
.rp-hero { padding: 72px 0 48px; background: var(--rp-color-surface); }
.rp-hero h1 { font-size: clamp(28px, 4vw, 44px); margin: 0 0 8px; }
.rp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.rp-card__link { display: block; color: inherit; text-decoration: none; }
.rp-card__media { aspect-ratio: 16 / 10; background: var(--rp-color-surface); border-radius: var(--rp-radius); overflow: hidden; }
.rp-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.rp-card__link:hover img { transform: scale(1.03); }
.rp-card__body { padding-top: 12px; }
.rp-card__date { font-size: 13px; color: var(--rp-color-muted); }
.rp-card__title { font-size: 18px; margin: 4px 0 6px; }
.rp-card__excerpt { font-size: 14px; color: var(--rp-color-muted); margin: 0; }
.rp-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.rp-filter a { padding: 4px 14px; border: 1px solid var(--rp-color-line); border-radius: 999px; text-decoration: none; color: inherit; font-size: 14px; }
.rp-filter a[aria-current="page"] { background: var(--rp-color-accent); color: var(--rp-color-accent-text); border-color: var(--rp-color-accent); }
.rp-pagination { display: flex; justify-content: center; gap: 12px; align-items: center; margin-top: 40px; flex-wrap: wrap; }
.rp-pagination a, .rp-pagination span[aria-current] { min-width: 36px; height: 36px; display: inline-grid; place-items: center; padding: 0 10px; border-radius: 8px; text-decoration: none; }
.rp-pagination span[aria-current] { background: var(--rp-color-accent); color: var(--rp-color-accent-text); }
.rp-more { display: block; margin: 32px auto 0; }

/* 記事 */
.rp-article { max-width: calc(var(--rp-prose) + 40px); padding-top: 32px; padding-bottom: 48px; }
.rp-article__head h1 { font-size: clamp(26px, 3.4vw, 36px); margin: 12px 0; }
.rp-article__meta { color: var(--rp-color-muted); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rp-article__eyecatch { margin: 24px 0; }
.rp-article__eyecatch img { border-radius: var(--rp-radius); width: 100%; }
.rp-tag { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--rp-color-surface); color: inherit; text-decoration: none; }
.rp-breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--rp-color-muted); }
.rp-breadcrumbs li + li::before { content: "›"; margin-right: 6px; }
.rp-breadcrumbs a { color: inherit; }

/* 本文（BlockRenderer の出力） */
.rp-prose { font-size: 16.5px; line-height: 2; overflow-wrap: anywhere; }
.rp-prose > * + * { margin-top: 1.4em; }
.rp-prose h2 { font-size: 24px; margin-top: 2.4em; padding-bottom: 8px; border-bottom: 2px solid var(--rp-color-line); }
.rp-prose h3 { font-size: 20px; margin-top: 2em; }
.rp-prose h4 { font-size: 17px; margin-top: 1.8em; }
.rp-prose p, .rp-prose ul, .rp-prose ol, .rp-prose figure, .rp-prose blockquote { margin-bottom: 0; }
.rp-prose ul, .rp-prose ol { padding-left: 1.4em; }
.rp-prose blockquote { margin-left: 0; padding: 8px 20px; border-left: 4px solid var(--rp-color-line); color: var(--rp-color-muted); }
.rp-prose pre { background: #1c1c1f; color: #f4f4f5; padding: 16px 18px; border-radius: 8px; overflow-x: auto; font-size: 14px; line-height: 1.7; }
.rp-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--rp-color-surface); padding: 2px 6px; border-radius: 4px; }
.rp-prose pre code { background: none; padding: 0; }
.rp-prose hr { border: 0; border-top: 1px solid var(--rp-color-line); margin: 3em 0; }
.rp-prose mark { padding: 0 3px; border-radius: 3px; }
.rp-align--center { text-align: center; }
.rp-align--right { text-align: right; }
.rp-figure { margin-left: 0; margin-right: 0; margin-bottom: 0; }
.rp-figure img { border-radius: 8px; margin: 0 auto; }
.rp-figure figcaption { font-size: 13px; color: var(--rp-color-muted); text-align: center; margin-top: 8px; }
.rp-figure--left, .rp-figure--right { max-width: 60%; }
.rp-figure--left { margin-right: auto; }
.rp-figure--right { margin-left: auto; }
.rp-figure--wide img { width: 100%; }
.rp-table { overflow-x: auto; }
.rp-table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.rp-table th, .rp-table td { border: 1px solid var(--rp-color-line); padding: 10px 14px; text-align: left; vertical-align: top; }
.rp-table th { background: var(--rp-color-surface); }
.rp-embed { position: relative; width: 100%; }
.rp-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.rp-buttons { text-align: center; }
.rp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 28px; border-radius: 999px; background: var(--rp-color-accent); color: var(--rp-color-accent-text); font-weight: 700; text-decoration: none; border: 2px solid var(--rp-color-accent); cursor: pointer; font: inherit; font-weight: 700; }
.rp-btn:hover { opacity: 0.88; }
.rp-btn--outline { background: transparent; color: var(--rp-color-accent); }
.rp-btn--sm { min-height: 36px; padding: 0 16px; font-size: 14px; }
.rp-gallery { list-style: none; padding: 0; display: grid; gap: 12px; }
.rp-gallery--2 { grid-template-columns: repeat(2, 1fr); }
.rp-gallery--3 { grid-template-columns: repeat(3, 1fr); }
.rp-gallery--4 { grid-template-columns: repeat(4, 1fr); }
.rp-gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.rp-columns { display: grid; gap: 28px; }
.rp-columns--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rp-columns--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rp-column > * + * { margin-top: 1em; }
.rp-details { border: 1px solid var(--rp-color-line); border-radius: 8px; padding: 12px 16px; }
.rp-details summary { cursor: pointer; font-weight: 700; }
.rp-video video { display: block; width: 100%; height: auto; border-radius: var(--rp-radius); background: #000; }
.rp-faq { border-top: 1px solid var(--rp-color-line); margin: 1.5em 0; }
.rp-faq__item { border-bottom: 1px solid var(--rp-color-line); }
.rp-faq__item summary { cursor: pointer; font-weight: 700; padding: 14px 32px 14px 0; position: relative; list-style: none; }
.rp-faq__item summary::-webkit-details-marker { display: none; }
.rp-faq__item summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-weight: 400; font-size: 1.2em; }
.rp-faq__item[open] summary::after { content: "−"; }
.rp-faq__a { padding: 0 0 14px; color: var(--rp-color-muted); }
.rp-faq__a p { margin: 0; }

/* 検索 */
.rp-search { display: flex; gap: 8px; max-width: 560px; margin: 0 0 24px; }
.rp-center .rp-search { margin: 24px auto; }
.rp-search input { flex: 1; height: 48px; border: 1px solid var(--rp-color-line); border-radius: 999px; padding: 0 20px; font: inherit; }
.rp-results { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rp-results a { display: flex; flex-direction: column; padding: 16px; border-radius: 8px; color: inherit; text-decoration: none; }
.rp-results a:hover { background: var(--rp-color-surface); }
.rp-results span { font-size: 14px; color: var(--rp-color-muted); }

/* フォーム（F-01） */
.rp-form { display: flex; flex-direction: column; gap: 20px; max-width: 720px; }
.rp-form__field { display: flex; flex-direction: column; gap: 6px; }
.rp-form__label { font-weight: 700; font-size: 15px; }
.rp-form__req { display: inline-block; margin-left: 6px; font-size: 11px; background: #d93025; color: #fff; border-radius: 4px; padding: 1px 6px; vertical-align: 2px; }
.rp-form input[type=text], .rp-form input[type=email], .rp-form input[type=tel], .rp-form input[type=url], .rp-form input[type=number], .rp-form input[type=date], .rp-form select, .rp-form textarea {
  width: 100%; min-height: 48px; border: 1px solid #cfcfd4; border-radius: 8px; padding: 10px 14px; font: inherit; background: #fff;
}
.rp-form textarea { min-height: 160px; }
.rp-form [aria-invalid="true"] { border-color: #d93025; }
.rp-form__error { color: #d93025; font-size: 14px; font-weight: 700; }
.rp-form__help { font-size: 13px; color: var(--rp-color-muted); }
.rp-form__choices { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.rp-form__choice { display: inline-flex; gap: 8px; align-items: center; }
.rp-form__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rp-form__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.rp-form__alert { padding: 14px 16px; border-radius: 8px; background: #fdecec; color: #b42318; }
.rp-confirm dl { display: grid; grid-template-columns: 200px 1fr; gap: 12px 20px; }
.rp-confirm dt { font-weight: 700; }
.rp-confirm dd { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.rp-confirm dl { margin: 0 0 28px; padding: 20px; border: 1px solid var(--rp-color-line); border-radius: var(--rp-radius); max-width: 720px; }
.rp-confirm__lead { margin: 0 0 16px; }
.rp-form__fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.rp-form__fieldset legend { padding: 0; margin-bottom: 6px; }
.rp-form__section { padding-top: 8px; }
.rp-form__heading { margin: 0 0 4px; font-size: 18px; }
.rp-form__section .rp-form__help { margin: 0; }
.rp-form__help, .rp-form__error, .rp-form__carried { margin: 0; }
.rp-form__alerts:empty { display: none; }
.rp-form__alert { margin: 0; }
.rp-form__alerts .rp-form__error { padding: 14px 16px; border-radius: 8px; background: #fdecec; }
.rp-form__draft { margin: 0; padding: 10px 14px; border-radius: 8px; background: #fef3c7; color: #92400e; font-size: 14px; }
.rp-form__carried { font-size: 14px; }
.rp-form input[type=file] { font: inherit; max-width: 100%; }
.rp-form__choice input { width: 18px; height: 18px; flex-shrink: 0; margin: 0; }
.rp-form__consent .rp-form__choice { align-items: flex-start; }
.rp-form__consent .rp-form__choice input { margin-top: 5px; }
.rp-form-embed { background: transparent; }
.rp-form-embed main { padding: 16px; }

/* 同意バナー（4.5） */
.rp-consent { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 720px; margin: 0 auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-radius: 12px; background: #111; color: #fff; font-size: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2); }
.rp-consent a { color: #fff; }
.rp-consent__actions { margin-left: auto; display: flex; gap: 8px; }
.rp-consent button { border: 0; border-radius: 999px; padding: 8px 16px; font: inherit; cursor: pointer; }
.rp-consent[hidden] { display: none; }
.rp-consent__text { flex: 1 1 280px; margin: 0; line-height: 1.6; }
.rp-consent__allow { background: #fff; color: #111; font-weight: 600; }
.rp-consent__deny { background: transparent; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5); }
.rp-consent button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 480px) { .rp-consent__actions { margin-left: 0; width: 100%; } .rp-consent__actions button { flex: 1; } }

@media (max-width: 900px) {
  .rp-header__search { display: none; }
  .rp-nav-toggle { display: block; margin-left: auto; }
  .rp-nav-toggle summary { list-style: none; cursor: pointer; padding: 8px; }
  .rp-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--rp-color-line); padding: 12px 20px; }
  .rp-nav-toggle[open] + .rp-nav { display: block; }
  .rp-nav ul { flex-direction: column; align-items: flex-start; gap: 10px; }
  .rp-nav li ul { position: static; display: flex; box-shadow: none; border: 0; padding-left: 12px; }
  .rp-columns--2, .rp-columns--3 { grid-template-columns: 1fr; }
  .rp-gallery--3, .rp-gallery--4 { grid-template-columns: repeat(2, 1fr); }
  .rp-figure--left, .rp-figure--right { max-width: 100%; }
  .rp-confirm dl { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
