/*
Theme Name: Ranking VOD
Theme URI: https://ranking-vod.com/
Author: ranking-vod.com
Author URI: https://ranking-vod.com/
Description: 配信プラットフォーム別 映画・ドラマランキング「Ranking VOD」専用テーマ。フロントページは React 製ランキングアプリ、固定ページ・投稿は白基調のシンプルなレイアウトで表示します。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: MIT
License URI: https://opensource.org/licenses/MIT
Text Domain: ranking-vod
Tags: one-column, custom-menu, editor-style, blog, translation-ready
*/

/* =========================================================
   デザイントークン（React アプリ側 src/index.css と同じ値）
   ========================================================= */
:root {
  --rv-white: #ffffff;
  --rv-ink-950: #0a0a0c;
  --rv-ink-900: #17171b;
  --rv-ink-700: #3d3d45;
  --rv-ink-500: #6e6e79;
  --rv-ink-400: #9494a0;
  --rv-ink-300: #c5c5cf;
  --rv-ink-200: #e3e3ea;
  --rv-ink-100: #eeeef2;
  --rv-ink-50: #f7f7f9;
  --rv-accent: #4f46e5;
  --rv-accent-soft: #eef1ff;
  --rv-max: 46rem;
  --rv-max-wide: 64rem;
  --rv-font: 'Inter', 'Noto Sans JP', 'Hiragino Sans', 'Meiryo', system-ui, sans-serif;
}

/* =========================================================
   ベース
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--rv-white);
  color: var(--rv-ink-950);
  font-family: var(--rv-font);
  font-size: 16px;
  line-height: 1.9;
  font-feature-settings: 'palt' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--rv-ink-950);
  text-decoration-color: var(--rv-ink-300);
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--rv-accent);
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--rv-accent);
  outline-offset: 2px;
}

.rv-tnum {
  font-variant-numeric: tabular-nums;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.rv-skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 999;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--rv-ink-950);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

/* =========================================================
   フロントページ（React アプリ）
   アプリが自前でヘッダー／フッターを描画するため、
   WordPress 側のクロームは出力しない
   ========================================================= */
.rv-app-root {
  min-height: 100vh;
}

body.rv-app-page.admin-bar .rv-app-root {
  min-height: calc(100vh - 32px);
}

.rv-noscript {
  max-width: var(--rv-max);
  margin: 0 auto;
  padding: 4rem 1.25rem;
  text-align: center;
  color: var(--rv-ink-500);
}

/* =========================================================
   サイトヘッダー（投稿・固定ページ側）
   ========================================================= */
.rv-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rv-ink-100);
}

.rv-header__inner {
  max-width: var(--rv-max-wide);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 640px) {
  .rv-header__inner {
    height: 4rem;
    padding: 0 1.5rem;
  }
}

.rv-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  min-width: 0;
  text-decoration: none;
}

.rv-brand:hover {
  color: inherit;
}

.rv-brand__mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--rv-ink-950);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.rv-brand__name {
  display: block;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--rv-ink-950);
}

.rv-brand__name em {
  font-style: normal;
  color: var(--rv-accent);
}

.rv-brand__domain {
  display: block;
  margin-top: 0.375rem;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  color: var(--rv-ink-400);
}

.rv-nav ul {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rv-nav a {
  font-size: 13px;
  font-weight: 600;
  color: var(--rv-ink-500);
  text-decoration: none;
}

.rv-nav a:hover,
.rv-nav .current-menu-item > a {
  color: var(--rv-ink-950);
}

@media (max-width: 639px) {
  .rv-nav ul {
    gap: 0.875rem;
  }
  .rv-nav a {
    font-size: 12px;
  }
}

/* =========================================================
   本文レイアウト
   ========================================================= */
.rv-main {
  max-width: var(--rv-max);
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

@media (min-width: 640px) {
  .rv-main {
    padding: 4.5rem 1.5rem 6rem;
  }
}

.rv-main--wide {
  max-width: var(--rv-max-wide);
}

.rv-eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--rv-ink-400);
}

.rv-page-title {
  margin: 0.625rem 0 0;
  font-size: 1.875rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.035em;
}

@media (min-width: 640px) {
  .rv-page-title {
    font-size: 2.5rem;
  }
}

.rv-meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  font-size: 12px;
  color: var(--rv-ink-400);
}

.rv-meta__sep {
  color: var(--rv-ink-200);
}

.rv-featured {
  margin: 2.5rem 0 0;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--rv-ink-100);
}

.rv-featured img {
  display: block;
  width: 100%;
}

/* 記事本文 */
.rv-content {
  margin-top: 2.5rem;
  font-size: 15px;
  line-height: 2;
  color: var(--rv-ink-900);
}

.rv-content > * + * {
  margin-top: 1.5rem;
}

.rv-content h2 {
  margin-top: 3.5rem;
  margin-bottom: 1.25rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--rv-ink-100);
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.45;
}

.rv-content h3 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.5;
}

.rv-content h4 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
}

.rv-content p {
  margin: 0;
}

.rv-content ul,
.rv-content ol {
  margin: 0;
  padding-left: 1.375rem;
}

.rv-content li + li {
  margin-top: 0.5rem;
}

.rv-content blockquote {
  margin: 0;
  padding: 0.25rem 0 0.25rem 1.25rem;
  border-left: 2px solid var(--rv-ink-200);
  color: var(--rv-ink-500);
}

.rv-content img,
.rv-content figure {
  border-radius: 0.75rem;
}

.rv-content figure {
  margin: 0;
}

.rv-content figcaption {
  margin-top: 0.625rem;
  font-size: 12px;
  color: var(--rv-ink-400);
  text-align: center;
}

.rv-content code {
  padding: 0.15em 0.4em;
  border-radius: 0.375rem;
  background: var(--rv-ink-50);
  border: 1px solid var(--rv-ink-100);
  font-size: 0.875em;
}

.rv-content pre {
  padding: 1.125rem 1.25rem;
  border-radius: 0.875rem;
  background: var(--rv-ink-950);
  color: #f4f4f6;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.7;
}

.rv-content pre code {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
}

.rv-content hr {
  border: 0;
  border-top: 1px solid var(--rv-ink-100);
}

.rv-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.rv-content th,
.rv-content td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--rv-ink-100);
  text-align: left;
}

.rv-content th {
  font-weight: 700;
  color: var(--rv-ink-500);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.rv-table-scroll {
  overflow-x: auto;
}

/* =========================================================
   記事一覧
   ========================================================= */
.rv-list {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rv-ink-100);
}

.rv-list > li {
  border-bottom: 1px solid var(--rv-ink-100);
}

.rv-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0.75rem;
  margin: 0 -0.75rem;
  border-radius: 1rem;
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.rv-card:hover {
  background: var(--rv-ink-50);
  color: inherit;
}

.rv-card__thumb {
  width: 5rem;
  aspect-ratio: 3 / 2;
  flex-shrink: 0;
  border-radius: 0.625rem;
  overflow: hidden;
  background: var(--rv-ink-100);
}

@media (min-width: 640px) {
  .rv-card__thumb {
    width: 7.5rem;
  }
}

.rv-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rv-card__body {
  min-width: 0;
  flex: 1;
}

.rv-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--rv-ink-950);
}

.rv-card__date {
  display: block;
  margin-top: 0.5rem;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--rv-ink-400);
}

.rv-card__excerpt {
  margin: 0.5rem 0 0;
  font-size: 13px;
  line-height: 1.75;
  color: var(--rv-ink-500);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ページネーション */
.rv-pagination {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.rv-pagination .page-numbers {
  display: grid;
  place-items: center;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0 0.625rem;
  border-radius: 999px;
  border: 1px solid var(--rv-ink-200);
  font-size: 13px;
  font-weight: 600;
  color: var(--rv-ink-500);
  text-decoration: none;
}

.rv-pagination .page-numbers:hover {
  border-color: var(--rv-ink-300);
  color: var(--rv-ink-950);
}

.rv-pagination .page-numbers.current {
  background: var(--rv-ink-950);
  border-color: var(--rv-ink-950);
  color: #fff;
}

.rv-pagination .dots {
  border-color: transparent;
}

/* =========================================================
   ボタン
   ========================================================= */
.rv-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--rv-ink-950);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.rv-button:hover {
  background: var(--rv-ink-900);
  color: #fff;
}

.rv-button--ghost {
  background: transparent;
  border: 1px solid var(--rv-ink-200);
  color: var(--rv-ink-950);
}

.rv-button--ghost:hover {
  background: var(--rv-ink-50);
  border-color: var(--rv-ink-300);
  color: var(--rv-ink-950);
}

/* =========================================================
   フッター
   ========================================================= */
.rv-footer {
  border-top: 1px solid var(--rv-ink-100);
}

.rv-footer__inner {
  max-width: var(--rv-max-wide);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

@media (min-width: 640px) {
  .rv-footer__inner {
    padding: 3rem 1.5rem 4rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
  }
}

.rv-footer__name {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.rv-footer__name em {
  font-style: normal;
  color: var(--rv-accent);
}

.rv-footer__tagline {
  margin: 0.375rem 0 0;
  font-size: 12px;
  color: var(--rv-ink-400);
}

.rv-footer__note {
  margin: 1.5rem 0 0;
  font-size: 11px;
  line-height: 1.8;
  color: var(--rv-ink-400);
}

@media (min-width: 640px) {
  .rv-footer__note {
    margin: 0;
    text-align: right;
  }
}

.rv-footer__copy {
  max-width: var(--rv-max-wide);
  margin: 0 auto;
  padding: 0 1.25rem 2.5rem;
  font-size: 11px;
  color: var(--rv-ink-300);
}

@media (min-width: 640px) {
  .rv-footer__copy {
    padding: 0 1.5rem 3rem;
  }
}

/* =========================================================
   コメント
   ========================================================= */
.rv-comments {
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--rv-ink-100);
}

.rv-comments h2 {
  margin: 0 0 1.5rem;
  font-size: 1.125rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.rv-comments ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rv-comments .comment-body {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rv-ink-100);
  font-size: 14px;
}

.rv-comments input[type='text'],
.rv-comments input[type='email'],
.rv-comments input[type='url'],
.rv-comments textarea {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--rv-ink-200);
  border-radius: 0.75rem;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
}

.rv-comments .submit {
  height: 2.75rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--rv-ink-950);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
