/*
Theme Name: Sunny Review
Theme URI: https://example.com/
Author: You
Description: 明るく親しみやすい動画レビュー・紹介サイト用テーマ。評価・バッジ・CTAボタン・年齢確認ゲート付き。
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sunny-review
*/

:root {
  --bg: #FFFFFF;
  --bg-soft: #FFF4EC;
  --ink: #2B2B33;
  --sub: #6E6E78;
  --accent: #FF6B81;
  --accent-dark: #E84C64;
  --sunny: #FFC53D;
  --line: #F0E4DA;
  --radius: 16px;
  --shadow: 0 6px 20px rgba(43, 43, 51, 0.08);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

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

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: "M PLUS Rounded 1c", "Noto Sans JP", sans-serif;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 0.6em;
}

:focus-visible {
  outline: 3px solid var(--sunny);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ヘッダー */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.site-title {
  font-family: "M PLUS Rounded 1c", sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0;
}

.site-title a { color: var(--ink); text-decoration: none; }
.site-title a span { color: var(--accent); }

.site-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
}

/* ヒーロー */
.hero {
  background: linear-gradient(135deg, var(--bg-soft), #FFECF0);
  padding: 48px 0;
  text-align: center;
}

.hero h1 { font-size: 1.9rem; margin-bottom: 0.3em; }
.hero p { color: var(--sub); margin: 0 0 20px; }

.hero .search-form {
  display: flex;
  justify-content: center;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
}

.hero .search-form input[type="search"] {
  flex: 1;
  padding: 12px 18px;
  border: 2px solid var(--line);
  border-radius: 999px;
  font-size: 1rem;
}

.hero .search-form button {
  padding: 12px 22px;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
}

.hero .search-form button:hover { background: var(--accent-dark); }

/* カードグリッド */
.section-title {
  font-size: 1.4rem;
  margin: 40px 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: "";
  width: 10px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--accent), var(--sunny));
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(43, 43, 51, 0.14);
}

.card-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #FFD9E0, #FFEFC9);
  display: block;
  overflow: hidden;
}

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

.card-badge {
  position: absolute;
  top: 12px;
  left: -6px;
  background: var(--sunny);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 0 999px 999px 0;
  transform: rotate(-3deg);
  box-shadow: var(--shadow);
}

.card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.card-title {
  font-size: 1.02rem;
  margin: 0;
}

.card-title a { color: var(--ink); }

.card-excerpt {
  color: var(--sub);
  font-size: 0.88rem;
  margin: 0;
  flex: 1;
}

/* 評価スター */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--accent-dark);
  font-size: 0.95rem;
}

.stars .star-track {
  position: relative;
  display: inline-block;
  font-size: 1.05rem;
  line-height: 1;
  color: #E5DCD4;
  letter-spacing: 2px;
}

.stars .star-fill {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--sunny);
}

/* ボタン */
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff !important;
  font-weight: 900;
  text-align: center;
  padding: 14px 28px;
  border-radius: 999px;
  text-decoration: none !important;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover { background: var(--accent-dark); transform: translateY(-2px); }

.btn-block { display: block; width: 100%; }

.card .btn {
  padding: 10px 16px;
  font-size: 0.92rem;
}

/* 記事ページ */
.single-main { padding: 40px 0 64px; }

.entry-header { margin-bottom: 24px; }

.entry-meta {
  color: var(--sub);
  font-size: 0.85rem;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.entry-thumb {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin: 24px 0;
}

.review-box {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
  flex-wrap: wrap;
}

.review-score {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #fff;
  border: 4px solid var(--sunny);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: "M PLUS Rounded 1c", sans-serif;
  transform: rotate(-4deg);
  flex-shrink: 0;
}

.review-score strong { font-size: 1.5rem; line-height: 1; color: var(--accent-dark); }
.review-score small { font-size: 0.65rem; color: var(--sub); }

.entry-content { max-width: 760px; }

.entry-content h2 {
  border-bottom: 3px solid var(--bg-soft);
  padding-bottom: 8px;
  margin-top: 1.8em;
}

.cta-area {
  background: linear-gradient(135deg, #FFF0E4, #FFE4EA);
  border-radius: var(--radius);
  text-align: center;
  padding: 32px 24px;
  margin: 40px 0;
}

.cta-area p { margin: 0 0 14px; font-weight: 700; }

.cta-area .btn { font-size: 1.1rem; padding: 16px 40px; }

.cta-note { font-size: 0.78rem; color: var(--sub); margin-top: 10px !important; font-weight: 400 !important; }

/* ページネーション */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 8px 0 56px;
}

.pagination .page-numbers {
  display: inline-block;
  min-width: 40px;
  padding: 8px 12px;
  text-align: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* フッター */
.site-footer {
  background: var(--ink);
  color: #EDEDF2;
  padding: 36px 0;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer .adult-notice {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  padding: 6px 14px;
  margin-bottom: 14px;
  font-weight: 700;
}

.site-footer p { margin: 4px 0; }

/* 年齢確認ゲート */
.age-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(43, 43, 51, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.age-gate[hidden] { display: none; }

.age-gate-box {
  background: #fff;
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 36px 28px;
  text-align: center;
}

.age-gate-box h2 { font-size: 1.3rem; }

.age-gate-box p { color: var(--sub); font-size: 0.92rem; }

.age-gate-buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.age-gate-buttons .btn { flex: 1; border: none; cursor: pointer; font-size: 1rem; }

.age-gate-buttons .btn-no {
  background: #EDEDF2;
  color: var(--ink) !important;
}

.age-gate-buttons .btn-no:hover { background: #DDDDE4; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (max-width: 640px) {
  .hero h1 { font-size: 1.4rem; }
  .site-nav { display: none; }
}
