/* ============================================
   NEXT TITLEs まとめサイト CSS v2
   PlaySphere風 - 青系クリーン
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700;900&display=swap');

:root {
  --primary: #0070d1;
  --primary-dark: #005baa;
  --primary-light: #eef3ff;
  --accent: #ff6b35;
  --bg: #f4f6f9;
  --card: #fff;
  --border: #e2e6ec;
  --text: #1a1a1a;
  --text-sub: #666;
  --text-muted: #999;
  --radius: 8px;
  --shadow: 0 1px 4px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 16px rgba(0,112,209,0.12);
  --max-w: 1080px;
  --res-name: #228b22;
  --res-num: #0070d1;
  --res-id: #aaa;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg); color: var(--text); line-height: 1.75; min-height: 100vh; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.m-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.m-header-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 16px; height: 52px; display: flex; align-items: center; justify-content: space-between; }
.m-logo { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 17px; color: var(--text); }
.m-logo img { height: 28px; width: auto; }
.m-nav { display: flex; gap: 4px; }
.m-nav a { padding: 5px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-sub); transition: all 0.15s; }
.m-nav a:hover { background: var(--bg); color: var(--text); }
.m-nav a.active { background: var(--primary); color: #fff; }

.m-hero { background: linear-gradient(135deg, #0070d1 0%, #00a0e0 100%); color: #fff; text-align: center; padding: 28px 16px 24px; }
.m-hero h1 { font-size: 20px; font-weight: 900; letter-spacing: 0.02em; }
.m-hero p { font-size: 12.5px; opacity: 0.8; margin-top: 4px; }

.m-cat-tab { padding: 5px 14px; border-radius: 16px; font-size: 12.5px; font-weight: 700; background: var(--card); border: 1px solid var(--border); color: var(--text-sub); transition: all 0.15s; white-space: nowrap; }
.m-cat-tab:hover { border-color: var(--primary); color: var(--primary); }
.m-cat-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.m-layout { max-width: var(--max-w); margin: 0 auto; padding: 16px; display: grid; grid-template-columns: 1fr 260px; gap: 20px; }
.m-main { min-width: 0; }

.m-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.m-card { display: flex; flex-direction: column; background: var(--card); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); transition: all 0.2s; }
.m-card:hover { border-color: var(--primary); box-shadow: var(--shadow-hover); }
.m-card-thumb { position: relative; aspect-ratio: 16 / 10; background: #e8ecf0; overflow: hidden; }
.m-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.m-card:hover .m-card-thumb img { transform: scale(1.04); }
.m-card-thumb-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: rgba(255,255,255,0.7); }
.m-card-badge { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.7); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 4px; backdrop-filter: blur(4px); }
.m-card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.m-card-meta { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); margin-bottom: 8px; }
.m-card-comments { color: var(--primary); font-weight: 700; }
.m-card-title { font-size: 15px; font-weight: 900; line-height: 1.55; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.m-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 24px 0; flex-wrap: wrap; }
.m-page-btn { padding: 7px 14px; background: var(--primary); color: #fff; border-radius: 6px; font-size: 13px; font-weight: 700; transition: background 0.15s; }
.m-page-btn:hover { background: var(--primary-dark); }
.m-page-num { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; border-radius: 6px; font-size: 14px; font-weight: 700; color: var(--text-sub); background: var(--card); border: 1px solid var(--border); transition: all 0.15s; }
.m-page-num:hover { border-color: var(--primary); color: var(--primary); }
.m-page-num.active { background: var(--primary); color: #fff; border-color: var(--primary); pointer-events: none; }
.m-page-dots { display: inline-flex; align-items: center; justify-content: center; width: 28px; font-size: 14px; color: var(--text-muted); }
.m-empty { text-align: center; padding: 80px 20px; color: var(--text-muted); font-size: 14px; }

.m-sidebar { align-self: start; }
.m-sidebar-section { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.m-sidebar-section h3 { font-size: 15px; font-weight: 900; margin-bottom: 10px; }
.m-sidebar-desc { font-size: 13.5px; color: var(--text-sub); margin-bottom: 12px; }
.m-sidebar-cta { display: block; text-align: center; padding: 9px; background: var(--primary); color: #fff; border-radius: 6px; font-size: 14px; font-weight: 700; transition: background 0.15s; }
.m-sidebar-cta:hover { background: var(--primary-dark); }
.m-sidebar-cats { list-style: none; }
.m-sidebar-cats li { border-bottom: 1px solid #f0f0f0; }
.m-sidebar-cats li:last-child { border-bottom: none; }
.m-sidebar-cats a { display: block; padding: 8px 4px; font-size: 14px; color: var(--text); transition: color 0.15s; }
.m-sidebar-cats a:hover { color: var(--primary); }

.m-breadcrumb { font-size: 12px; color: var(--text-muted); max-width: var(--max-w); margin: 0 auto; padding: 14px 16px 0; }
.m-breadcrumb a { color: var(--primary); }
.m-breadcrumb a:hover { text-decoration: underline; }

.m-article { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); padding: 28px; }
.m-article-header { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 16px; }
.m-article-type { display: inline-block; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 4px; margin-bottom: 8px; }
.m-article-title { font-size: 24px; font-weight: 900; line-height: 1.45; margin-bottom: 12px; color: var(--text); }
.m-article-meta { font-size: 14px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.m-article-cat { background: var(--primary-light); color: var(--primary); padding: 1px 8px; border-radius: 4px; font-weight: 700; }
.m-article-tags { margin-top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.m-tag { font-size: 13px; color: var(--primary); background: var(--primary-light); padding: 3px 12px; border-radius: 12px; }
.m-article-body { font-size: 15.5px; line-height: 1.9; margin-bottom: 24px; color: var(--text-sub); }
.m-article-body p { margin-bottom: 0.8em; }

.m-res-list { margin-bottom: 24px; }
.m-res { padding: 14px 0; border-bottom: 1px solid #ebebeb; }
.m-res:last-child { border-bottom: none; }
.m-res-highlight { background: #fffdf0; border-left: 3px solid var(--accent); padding-left: 12px; margin-left: -12px; margin-right: -12px; padding-right: 12px; }
.m-res-header { font-size: 13.5px; margin-bottom: 6px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.m-res-num { font-weight: 400; font-size: 11px; color: #ccc; }
.m-res-name-0 { color: var(--res-name); }
.m-res-name-1 { color: #3498db; }
.m-res-name-2 { color: #27ae60; }
.m-res-name-3 { color: #e67e22; }
.m-res-name-4 { color: #e74c3c; }
.m-res-name { font-weight: 700; color: var(--res-name); font-size: 13.5px; }
.m-res-id { color: var(--res-id); font-size: 12.5px; }
.m-res-body { font-size: 15.5px; line-height: 1.85; color: var(--text); padding-left: 2px; }
.m-res-color-0 { color: #333; }
.m-res-color-1 { color: #1a6dad; }
.m-res-color-2 { color: #2e8b57; }
.m-res-color-3 { color: #b8860b; }
.m-res-color-4 { color: #c0392b; }
.m-res-body .res-anchor { color: var(--primary); font-weight: 700; }
.m-res-img { max-width: 400px; max-height: 300px; border-radius: 6px; margin: 8px 0 4px; border: 1px solid var(--border); cursor: pointer; transition: opacity 0.15s; }
.m-res-img:hover { opacity: 0.85; }
.m-res-link { color: var(--primary); word-break: break-all; font-size: 13px; }
.m-res-link:hover { text-decoration: underline; }

.m-owner-comment { margin-top: 24px; font-size: 14.5px; line-height: 1.8; color: var(--text-sub); }
.m-owner-comment p { margin-bottom: 0.6em; }
.m-owner-comment p:last-child { margin-bottom: 0; }

.m-source { margin: 16px 0 24px; padding: 12px 18px; background: var(--bg); border-radius: var(--radius); border: 1px solid var(--border); font-size: 12.5px; display: flex; align-items: center; gap: 10px; }
.m-source-label { background: var(--text-muted); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; flex-shrink: 0; }
.m-source-url { color: var(--text-muted); word-break: break-all; }

.m-game-cards { margin: 24px 0; padding: 18px; background: #f0f7ff; border-radius: var(--radius); border: 1px solid #d0e4ff; }
.m-game-cards h3 { font-size: 15px; font-weight: 900; margin-bottom: 10px; }
.m-game-cards-grid { display: flex; flex-direction: column; gap: 6px; }
.m-game-card { display: flex; align-items: center; gap: 10px; background: var(--card); padding: 8px 10px; border-radius: 6px; border: 1px solid #e0e8f0; transition: all 0.15s; }
.m-game-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,112,209,0.1); }
.m-game-card img { width: 52px; height: 52px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.m-game-card-info { flex: 1; min-width: 0; }
.m-game-card-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-game-card-price { font-size: 12.5px; color: #d32f2f; font-weight: 700; margin-top: 1px; }
.m-sale-badge { background: #d32f2f; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 4px; }

.m-share { text-align: center; margin: 24px 0; padding-top: 16px; border-top: 1px solid #eee; }
.m-share p { font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.m-share-btns { display: flex; justify-content: center; gap: 6px; }
.m-share-btn { display: inline-block; padding: 7px 16px; border-radius: 6px; font-size: 12.5px; font-weight: 700; color: #fff; border: none; cursor: pointer; transition: opacity 0.15s; }
.m-share-btn:hover { opacity: 0.85; }
.m-share-x { background: #1a1a1a; }
.m-share-line { background: #06c755; }
.m-share-hatena { background: #00a4de; }
.m-share-copy { background: #888; }

.m-related { margin-top: 24px; padding-top: 16px; border-top: 1px solid #eee; }
.m-related h3 { font-size: 16px; font-weight: 900; margin-bottom: 12px; }
.m-related-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f0f0; transition: color 0.15s; }
.m-related-item:hover { color: var(--primary); }
.m-related-title { font-size: 14.5px; font-weight: 700; flex: 1; }
.m-related-time { font-size: 12.5px; color: var(--text-muted); flex-shrink: 0; margin-left: 12px; }

.m-back { padding: 20px 0; }
.m-back a { color: var(--primary); font-size: 13px; font-weight: 700; }
.m-back a:hover { text-decoration: underline; }

.m-footer { background: var(--card); border-top: 1px solid var(--border); margin-top: 40px; }
.m-footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 20px 16px; text-align: center; }
.m-footer-inner p { font-size: 11.5px; color: var(--text-muted); }
.m-footer-inner nav { margin-top: 6px; display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.m-footer-inner nav a { font-size: 11.5px; color: var(--text-muted); }
.m-footer-inner nav a:hover { color: var(--primary); }
.m-footer-affiliate { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.m-sidebar-ads { padding: 14px; }
.m-sidebar-ads h3 { margin-bottom: 12px; }
.m-sidebar-ad-items { display: flex; flex-direction: column; gap: 6px; }
.m-sidebar-ad-loading { font-size: 12px; color: var(--text-muted); text-align: center; padding: 12px 0; }
.m-sidebar-ad-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 6px; border: 1px solid var(--border); background: var(--card); transition: all 0.15s; }
.m-sidebar-ad-card:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(0,112,209,0.1); }
.m-sidebar-ad-img { width: 56px; height: 56px; flex-shrink: 0; border-radius: 5px; overflow: hidden; background: #f0f2f5; }
.m-sidebar-ad-img img { width: 100%; height: 100%; object-fit: contain; }
.m-sidebar-ad-info { flex: 1; min-width: 0; }
.m-sidebar-ad-name { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-sidebar-ad-price { font-size: 13px; font-weight: 900; color: #d32f2f; margin-top: 2px; }

.m-ad-unit { margin: 20px 0; text-align: center; }
.m-ad-unit:empty, .m-ad-unit:has(ins[data-ad-slot=""]) { display: none !important; margin: 0 !important; }
.m-ad-article-top { margin-top: 16px; margin-bottom: 20px; }
.m-ad-article-mid { margin-top: 24px; margin-bottom: 24px; }
.m-sidebar-section:has(.m-ad-unit:only-child ins[data-ad-slot=""]) { display: none; }

.m-article-thumbnail { margin: 16px 0 20px; border-radius: 8px; overflow: hidden; line-height: 0; }
.m-article-thumbnail img { width: 100%; height: auto; max-height: 400px; object-fit: cover; border-radius: 8px; }

/* =============================================
   検索フォーム
   ============================================= */
.m-search-form { display: flex; align-items: center; gap: 0; }
.m-search-form input[type="text"] { width: 180px; padding: 6px 12px; border: 1px solid var(--border); border-right: none; border-radius: 6px 0 0 6px; font-size: 13px; outline: none; transition: border-color 0.15s; }
.m-search-form input[type="text"]:focus { border-color: var(--primary); }
.m-search-form button { padding: 6px 12px; background: var(--primary); color: #fff; border: 1px solid var(--primary); border-radius: 0 6px 6px 0; font-size: 13px; cursor: pointer; transition: background 0.15s; }
.m-search-form button:hover { background: var(--primary-dark); }

/* =============================================
   ニュースティッカー
   ============================================= */
.m-ticker { background: #1a1a2e; color: #fff; overflow: hidden; white-space: nowrap; padding: 7px 0; font-size: 13px; }
.m-ticker-label { display: inline-block; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 3px; margin-right: 12px; vertical-align: middle; }
.m-ticker-track { display: inline-flex; animation: tickerScroll 45s linear infinite; will-change: transform; }
.m-ticker-track:hover { animation-play-state: paused; }
.m-ticker-item { display: inline-block; padding: 0 20px; color: #ccd6e0; transition: color 0.15s; }
.m-ticker-item:hover { color: #fff; }
.m-ticker-item::before { content: "●"; color: var(--accent); margin-right: 6px; font-size: 8px; vertical-align: middle; }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* =============================================
   ピックアップ（注目記事）
   ============================================= */
.m-pickup { max-width: var(--max-w); margin: 0 auto; padding: 16px 16px 0; }
.m-pickup h2 { font-size: 16px; font-weight: 900; margin-bottom: 10px; color: var(--text); }
.m-pickup-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.m-pickup-card { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; background: #2a2a3a; display: block; }
.m-pickup-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s, opacity 0.3s; }
.m-pickup-card:hover img { transform: scale(1.05); opacity: 0.8; }
.m-pickup-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.85)); padding: 32px 12px 10px; }
.m-pickup-title { color: #fff; font-size: 13px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.m-pickup-card .m-card-badge { top: 8px; left: 8px; right: auto; }

/* =============================================
   カテゴリ横スクロールナビ
   ============================================= */
.m-categories { max-width: var(--max-w); margin: 0 auto; padding: 12px 16px 4px; display: flex; gap: 6px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.m-categories::-webkit-scrollbar { display: none; }

/* =============================================
   人気記事ランキング
   ============================================= */
.m-ranking { list-style: none; counter-reset: rank; }
.m-ranking li { counter-increment: rank; border-bottom: 1px solid #f0f0f0; }
.m-ranking li:last-child { border-bottom: none; }
.m-ranking a { display: flex; align-items: flex-start; gap: 10px; padding: 9px 4px; font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.45; transition: color 0.15s; }
.m-ranking a:hover { color: var(--primary); }
.m-ranking a::before { content: counter(rank); display: flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; border-radius: 50%; background: var(--border); color: var(--text-sub); font-size: 12px; font-weight: 900; flex-shrink: 0; }
.m-ranking li:nth-child(1) a::before { background: #ffd700; color: #fff; }
.m-ranking li:nth-child(2) a::before { background: #c0c0c0; color: #fff; }
.m-ranking li:nth-child(3) a::before { background: #cd7f32; color: #fff; }

/* =============================================
   読者コメント欄
   ============================================= */
.m-reader-comments { margin-top: 28px; padding-top: 20px; border-top: 2px solid var(--border); }
.m-reader-comments h3 { font-size: 16px; font-weight: 900; margin-bottom: 16px; }
.m-comment-list { margin-bottom: 24px; }
.m-comment-item { padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.m-comment-item:last-child { border-bottom: none; }
.m-comment-meta { font-size: 12.5px; color: var(--text-muted); margin-bottom: 6px; display: flex; gap: 10px; }
.m-comment-name { font-weight: 700; color: var(--res-name); }
.m-comment-body { font-size: 14.5px; line-height: 1.75; color: var(--text); }
.m-comment-none { padding: 20px 0; text-align: center; color: var(--text-muted); font-size: 14px; }
.m-comment-form { margin-top: 16px; }
.m-comment-form input[type="text"], .m-comment-form textarea { width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; margin-bottom: 10px; outline: none; transition: border-color 0.15s; }
.m-comment-form input[type="text"]:focus, .m-comment-form textarea:focus { border-color: var(--primary); }
.m-comment-form textarea { min-height: 100px; resize: vertical; }
.m-comment-form button { display: inline-block; padding: 10px 28px; background: var(--primary); color: #fff; border: none; border-radius: 6px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background 0.15s; }
.m-comment-form button:hover { background: var(--primary-dark); }
.m-comment-msg { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 13px; font-weight: 700; }
.m-comment-msg-ok { background: #e8f5e9; color: #2e7d32; }
.m-comment-msg-err { background: #fce4ec; color: #c62828; }

/* =============================================
   検索結果ヘッダー
   ============================================= */
.m-search-header { padding: 16px 0; margin-bottom: 8px; }
.m-search-header h2 { font-size: 16px; font-weight: 900; color: var(--text); }
.m-search-header p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* =============================================
   レスポンシブ
   ============================================= */
@media (max-width: 768px) {
  .m-layout { grid-template-columns: 1fr; }
  .m-card-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .m-card-title { font-size: 13.5px; -webkit-line-clamp: 3; }
  .m-card-meta { font-size: 10.5px; }
  .m-card-body { padding: 10px 10px 12px; }
  .m-card-badge { font-size: 10px; padding: 2px 7px; }
  .m-hero h1 { font-size: 17px; }
  .m-hero { padding: 22px 16px 18px; }
  .m-article { padding: 16px; }
  .m-article-title { font-size: 18px; }
  .m-header-inner { padding: 0 12px; }
  .m-nav a { padding: 5px 8px; font-size: 11.5px; }
  .m-res-highlight { margin-left: -8px; margin-right: -8px; padding-left: 10px; padding-right: 10px; }
  .m-res-img { max-width: 100%; }
  .m-source { flex-direction: column; align-items: flex-start; gap: 6px; }
  .m-sidebar-ads { display: block; }
  .m-sidebar-ad-img { width: 48px; height: 48px; }
  .m-sidebar-ad-name { font-size: 12px; }
  .m-article-thumbnail img { max-height: 240px; }
  .m-search-form input[type="text"] { width: 120px; font-size: 12px; padding: 5px 8px; }
  .m-search-form button { padding: 5px 8px; font-size: 12px; }
  .m-pickup-grid { grid-template-columns: 1fr; }
  .m-pickup-card { aspect-ratio: 16 / 7; }
  .m-ticker { font-size: 12px; padding: 6px 0; }
  .m-ranking a { font-size: 12.5px; }
}

@media (max-width: 480px) {
  .m-card-grid { grid-template-columns: 1fr; gap: 10px; }
  .m-card-title { font-size: 15px; }
  .m-card-meta { font-size: 11px; }
  .m-card-thumb { aspect-ratio: 16 / 9; }
}