/*
Theme Name: AI Concierge Affiliate
Theme URI: https://example.com/
Author: ChatFlow
Description: AI診断×口コミ（訪問者投稿・星評価）×比較×アフィリエイト向けWordPressテーマ
Version: 2.1.0
Requires at least: 6.0
Requires PHP: 7.4
*/

:root{
  --ink:#111827;
  --muted:#6b7280;
  --line:#e5e7eb;
  --soft:#f8fafc;
  --primary:#111827;
  --accent:#2563eb;
  --radius:22px;
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic",Meiryo,sans-serif;
  color:var(--ink);
  background:#fff;
  line-height:1.7;
}
a{color:inherit;text-decoration:none}
.container{width:min(1120px,92vw);margin:auto}
.site-header{position:sticky;top:0;z-index:20;background:rgba(255,255,255,.92);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}
.nav{height:72px;display:flex;align-items:center;justify-content:space-between}
.brand{font-weight:800;letter-spacing:-.03em}
.brand span{color:var(--accent)}
.nav-links{display:flex;gap:22px;align-items:center;font-size:14px}
.nav-cta{padding:10px 16px;border-radius:999px;background:var(--primary);color:#fff;font-weight:700}
.hero{text-align:center;padding:92px 0 64px}
.hero .eyebrow{font-size:13px;font-weight:800;letter-spacing:.15em;color:var(--accent);text-transform:uppercase}
.hero h1{font-size:clamp(38px,6vw,68px);line-height:1.1;letter-spacing:-.055em;margin:16px auto 20px;max-width:900px}
.hero p{color:var(--muted);max-width:720px;margin:0 auto 34px;font-size:18px}
.searchbox{
  max-width:820px;margin:0 auto;display:flex;align-items:center;gap:12px;
  padding:12px 14px 12px 20px;border:1px solid #d1d5db;border-radius:999px;
  box-shadow:0 18px 50px rgba(15,23,42,.10);background:#fff;
}
.searchbox input{flex:1;border:0;outline:0;font-size:18px;background:transparent;min-width:0}
.searchbox button{border:0;border-radius:999px;background:var(--primary);color:#fff;padding:14px 24px;font-weight:800;cursor:pointer}
.hint{font-size:13px;color:var(--muted);margin-top:12px}
.section{padding:68px 0}
.section.alt{background:var(--soft)}
.center{text-align:center}
.section-title{font-size:34px;line-height:1.2;letter-spacing:-.03em;margin:0 0 14px}
.section-lead{color:var(--muted);margin:0 auto 34px;max-width:700px}
.steps,.cards,.reviews{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.card,.review,.result-card{border:1px solid var(--line);border-radius:var(--radius);padding:24px;background:#fff;box-shadow:0 8px 30px rgba(15,23,42,.05)}
.card h3,.result-card h3{margin:10px 0 8px}
.step-no{display:inline-grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#eff6ff;color:var(--accent);font-weight:800}
.tag{display:inline-block;padding:5px 10px;border-radius:999px;background:#f3f4f6;font-size:12px;color:#4b5563;margin:3px}
.products{display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.product-card{position:relative;border:1px solid var(--line);border-radius:24px;padding:24px;background:#fff}
.rank{position:absolute;top:18px;right:18px;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:#f3f4f6;font-weight:900}
.score{font-size:34px;font-weight:900;letter-spacing:-.04em}
.meter{height:9px;background:#eef2f7;border-radius:99px;overflow:hidden;margin:12px 0 18px}
.meter > span{display:block;height:100%;background:var(--accent);width:0}
.product-actions{display:flex;gap:10px;margin-top:18px}
.btn{display:inline-flex;justify-content:center;align-items:center;padding:12px 16px;border-radius:14px;border:1px solid var(--line);font-weight:800;cursor:pointer}
.btn-primary{background:var(--primary);color:#fff;border-color:var(--primary)}
.btn-soft{background:#f8fafc}
.review-meta{font-size:13px;color:var(--muted)}
.review-stars{letter-spacing:.15em}
.privacy{font-size:12px;color:var(--muted);margin-top:18px}
.site-footer{border-top:1px solid var(--line);padding:40px 0;color:var(--muted);font-size:13px;text-align:center}
#diagnosis{scroll-margin-top:90px}
.modal{display:none;position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:50;padding:20px;overflow:auto}
.modal.open{display:flex;align-items:center;justify-content:center}
.modal-card{width:min(760px,100%);background:#fff;border-radius:28px;padding:30px;position:relative}
.close{position:absolute;right:18px;top:18px;border:0;background:#f3f4f6;border-radius:50%;width:38px;height:38px;cursor:pointer}
.question{display:none}
.question.active{display:block}
.question h3{text-align:center;font-size:24px}
.options{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-top:22px}
.option{border:1px solid var(--line);border-radius:16px;padding:15px;text-align:center;cursor:pointer;background:#fff}
.option:hover,.option.selected{border-color:var(--accent);background:#eff6ff}
.progress{height:7px;border-radius:99px;background:#eef2f7;overflow:hidden;margin:14px 0 26px}
.progress span{display:block;height:100%;background:var(--accent);width:0}
.result{display:none}
.result.open{display:block}
@media(max-width:820px){
  .nav-links{display:none}
  .hero{padding:72px 0 48px}
  .searchbox{border-radius:24px;flex-direction:column;align-items:stretch}
  .searchbox input{padding:8px 4px}
  .searchbox button{width:100%}
  .steps,.cards,.products,.reviews{grid-template-columns:1fr}
}

/* ===== v2.1 追加：口コミ・商品ページ・CSV ===== */
.muted{color:var(--muted)}
.small{font-size:13px}
.container.narrow{width:min(760px,92vw)}
.pr-notice{font-size:12px;color:var(--muted);margin:0 0 18px;display:flex;align-items:center;gap:8px}
.pr-notice span{background:#fef3c7;color:#92400e;padding:1px 7px;border-radius:4px;font-weight:800;font-size:11px}
.stars{display:inline-flex;gap:1px;font-size:18px;line-height:1;color:#e5e7eb}
.stars.sm{font-size:14px}.stars.lg{font-size:24px}
.stars .s.on{color:#f59e0b}
.stars .s.half{background:linear-gradient(90deg,#f59e0b 50%,#e5e7eb 50%);-webkit-background-clip:text;background-clip:text;color:transparent}
.rating-line{display:flex;align-items:center;gap:6px;font-size:13px;margin:6px 0}
.rating-line.big{font-size:15px;margin:12px 0}
.card-thumb{display:block;border-radius:16px;overflow:hidden;margin-bottom:14px;aspect-ratio:16/10;background:#f3f4f6}
.card-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.product-card h3 a{text-decoration:none}
.product-card .catch{color:var(--muted);font-size:14px;margin:4px 0}
.btn.block{width:100%;margin-top:12px}
.product-hero{display:grid;grid-template-columns:1.2fr .8fr;gap:40px;align-items:center}
.product-title{font-size:clamp(28px,4vw,42px);letter-spacing:-.03em;margin:8px 0}
.product-hero .lead{font-size:17px;color:var(--muted)}
.product-thumb img{border-radius:var(--radius);width:100%;height:auto}
.product-grid{display:grid;grid-template-columns:1fr 300px;gap:40px;margin-top:48px;align-items:start}
.product-side{position:sticky;top:90px}
.side-card{text-align:center}
.side-score{font-size:42px;font-weight:900;letter-spacing:-.04em;line-height:1.1;margin:6px 0}
.side-score small{font-size:14px;color:var(--muted);font-weight:600}
.spec{width:100%;border-collapse:collapse;font-size:14.5px;border:1px solid var(--line);border-radius:16px;overflow:hidden}
.spec th{text-align:left;width:150px;padding:12px 16px;background:var(--soft);border-bottom:1px solid var(--line)}
.spec td{padding:12px 16px;border-bottom:1px solid var(--line)}
.pros-cons{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:24px}
.pc-head{font-size:11px;letter-spacing:.12em;font-weight:800;margin-bottom:8px}
.pc.good .pc-head{color:#059669}.pc.bad .pc-head{color:#dc2626}
.pc ul{margin:0;padding-left:18px;font-size:14px}
.entry-content{margin-top:32px;font-size:16px}
.entry-content img{max-width:100%;height:auto;border-radius:16px}
.cta-box{background:var(--primary);color:#fff;border-radius:var(--radius);padding:32px;text-align:center;margin:40px 0}
.cta-box h3{margin:0 0 8px;color:#fff}
.cta-box .muted{color:rgba(255,255,255,.7)}
.cta-box .btn-primary{background:var(--accent);border-color:var(--accent);margin-top:14px}
.reviews-area{margin-top:48px}
.review-list{list-style:none;margin:20px 0 0;padding:0}
.review-list .review{margin-bottom:12px;text-align:left}
.review-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13.5px}
.review-name{font-weight:700}
.review-head time{color:var(--muted);font-size:12px;margin-left:auto}
.review-body{margin-top:8px;font-size:14.5px}
.review-body p{margin:0 0 .6em}
.review-pending{font-size:12px;color:#dc2626;margin:8px 0 0}
.comment-respond{margin-top:32px;background:var(--soft);border-radius:var(--radius);padding:28px}
.comment-reply-title{font-size:20px;margin:0 0 6px}
.comment-form label{display:block;font-size:13px;font-weight:700;margin-bottom:6px}
.comment-form input[type="text"],.comment-form input[type="email"],.comment-form textarea{width:100%;padding:11px 12px;border:1px solid #d1d5db;border-radius:12px;font:inherit;font-size:14px;background:#fff}
.comment-form p{margin:0 0 14px}
.form-submit .submit{background:var(--primary);color:#fff;font-weight:800;font-size:15px;padding:13px 24px;border:0;border-radius:14px;cursor:pointer}
.stars-input{display:inline-flex;flex-direction:row-reverse;gap:2px}
.stars-input input{position:absolute;opacity:0;width:0;height:0}
.stars-input label{font-size:30px;color:#e5e7eb;cursor:pointer;margin:0;display:inline}
.stars-input label:hover,.stars-input label:hover ~ label,.stars-input input:checked ~ label{color:#f59e0b}
.post-item{margin-bottom:16px;text-align:left}
.post-item h2{margin:6px 0}
.post-item h2 a{text-decoration:none}
.foot-links a{color:var(--ink)}
.foot-legal{max-width:70ch;margin:14px auto;line-height:1.8}
@media(max-width:820px){
  .product-hero,.product-grid,.pros-cons{grid-template-columns:1fr}
  .product-side{position:static}
}

/* ===== ジャンル ===== */
.genres{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}
.genre-card{display:block;text-decoration:none}
.genre-card h3{margin:0 0 6px;font-size:18px}
.genre-card p{margin:0 0 8px;font-size:13.5px}
.genre-card:hover{border-color:var(--accent)}
.genre-label{display:inline-block;font-size:11px;font-weight:800;letter-spacing:.06em;color:var(--accent);background:#eff6ff;padding:3px 8px;border-radius:6px;margin-bottom:8px}
.genre-chips{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:0 0 20px}
.chip{padding:8px 14px;border-radius:999px;border:1px solid var(--line);background:#fff;font-size:13px;text-decoration:none}
.chip.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.options{max-height:60vh;overflow:auto}
@media(max-width:820px){.genres{grid-template-columns:1fr 1fr}}
@media(max-width:520px){.genres{grid-template-columns:1fr}}
