/* ============================================================
   site.css — ぎゃるげらぼ 共通スタイル (theme ③ navy)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;700&family=Noto+Serif+JP:wght@700&display=swap');

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Noto Sans JP', sans-serif; font-size: 13px; line-height: 1.85; background: #eef1f7; color: #1a2030; }
a { color: #1a3878; text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
h1,h2,h3,h4,h5,h6 { font-family: 'Noto Serif JP', serif; font-weight: 700; }

/* ===== LAYOUT ===== */
.body-wrap {
  max-width: 1080px;
  margin: 14px auto;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 200px 1fr 160px;
  gap: 12px;
  align-items: start;
}
@media (max-width: 780px) {
  .body-wrap { grid-template-columns: 1fr; }
  .left-sidebar, .right-col { display: none; }
}

/* ===== HEADER ===== */
.site-header { background: #1a2e5a; border-bottom: 3px solid #4a70c0; }
.header-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 12px;
  height: 56px; display: flex; align-items: center; gap: 20px;
}
.site-logo {
  font-family: 'Noto Serif JP', serif; font-size: 22px; font-weight: 700;
  color: #d8e4f8; letter-spacing: .04em; white-space: nowrap; text-decoration: none;
}
.site-logo small {
  font-size: 11px; font-weight: 400; color: #6878a8;
  font-family: 'Noto Sans JP', sans-serif; margin-left: 10px; letter-spacing: 0;
}
.header-nav { display: flex; gap: 0; margin-left: auto; }
.header-nav a {
  color: #a8bce0; font-size: 12px; padding: 4px 12px;
  border-left: 1px solid rgba(255,255,255,.1);
}
.header-nav a:first-child { border-left: none; }
.header-nav a:hover { color: #d8e4f8; text-decoration: none; }
.header-nav a.active { border-bottom: 2px solid #d8e4f8; color: #d8e4f8; }
.header-chibis { display: flex; align-items: flex-end; gap: 3px; padding-left: 12px; border-left: 1px solid rgba(255,255,255,.1); }
.chibi-ph { border-radius: 50% 50% 44% 44%; flex-shrink: 0; }
@media (max-width: 780px) { .header-chibis { display: none; } }

/* ===== CATEGORY BUTTONS ===== */
.cat-buttons { background: #fff; border-bottom: 2px solid #ccd8f0; padding: 8px 0; }
.cat-buttons-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 12px;
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
}
@media (max-width: 780px) { .cat-buttons-inner { grid-template-columns: repeat(3, 1fr); } }
.cat-btn {
  display: block; border-radius: 4px; overflow: hidden;
  transition: opacity .15s, transform .15s;
}
.cat-btn img { width: 100%; height: auto; display: block; }
.cat-btn:hover { opacity: .85; transform: translateY(-2px); }

/* ===== PLAYED BAR ===== */
.played-bar {
  background: #fff5f5; border: 1px solid #e8c0c0;
  border-radius: 4px; padding: 7px 12px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.played-btn {
  padding: 5px 13px; font-size: 12px; font-weight: 700;
  border: none; border-radius: 4px; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif; transition: background 150ms;
}
.played-btn--set   { background: #c0303a; color: #fff; }
.played-btn--set:hover { background: #a02030; }
.played-btn--unset { background: #e8d0d0; color: #7a2020; }
.played-btn--unset:hover { background: #dcc0c0; }
#played-note { font-size: 11px; color: #8a4040; }

/* ===== SIDEBAR ===== */
.sidebar-section { background: #fff; border: 1px solid #ccd8f0; margin-bottom: 8px; border-radius: 3px; overflow: hidden; }
.sb-head { background: #1a2e5a; color: #d8e4f8; font-size: 12px; font-weight: 700; padding: 6px 10px; letter-spacing: .04em; }
.sb-head.h2 { background: #243a70; }
.sb-head.h3 { background: #2e4880; }
.sidebar-tree { list-style: none; padding: 3px 0; }
.sidebar-tree li a { display: block; padding: 4px 10px 4px 16px; color: #1a2030; font-size: 12px; border-bottom: 1px dotted #dce8f8; }
.sidebar-tree li:last-child a { border-bottom: none; }
.sidebar-tree li a:hover { background: #eef1f7; text-decoration: none; color: #1a3878; }
.sidebar-tree li.game-title { padding: 5px 10px; font-weight: 700; color: #1a2e5a; background: #f4f7fd; border-bottom: 1px solid #ccd8f0; font-size: 12px; }
.sidebar-tree li.game-title > a { padding-left: 10px; font-weight: 700; color: #1a2e5a; background: #f4f7fd; border-bottom: 1px solid #ccd8f0; }
.sidebar-tree li.sub > a { padding-left: 22px; font-size: 11px; color: #3a5080; }
.sidebar-tree li.sub > a::before { content: '└ '; color: #a0b8d870; }
.sidebar-chibi-box { background: #f4f7fd; border: 1px solid #ccd8f0; border-radius: 3px; padding: 10px 8px; text-align: center; margin-bottom: 8px; }
.chibi-row { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin-bottom: 6px; }
.sidebar-chibi-box p { font-size: 11px; color: #6878a8; line-height: 1.6; }

/* ===== CONTENT BLOCKS ===== */
.content-block { background: #fff; border: 1px solid #ccd8f0; border-radius: 3px; margin-bottom: 10px; overflow: hidden; }
.block-head {
  background: #1a2e5a; color: #d8e4f8; font-size: 13px; font-weight: 700;
  padding: 7px 12px; display: flex; align-items: center; justify-content: space-between;
}
.block-head.h2 { background: #243a70; }
.block-head.h3 { background: #1e4870; }
.block-head a { color: rgba(216,228,248,.7); font-size: 11px; font-weight: 400; }
.block-body { padding: 12px 14px; font-size: 13px; line-height: 1.85; }
.block-body p + p { margin-top: 8px; }
.block-body ul { padding-left: 1.5em; }
.block-body li { margin-bottom: 4px; }
.block-body h3 { font-size: 13px; font-weight: 700; color: #1a2e5a; margin: 12px 0 4px; }
.block-body h3:first-child { margin-top: 0; }

/* ===== UPDATE LIST ===== */
.update-list { list-style: none; padding: 3px 0; }
.update-list li { display: flex; gap: 8px; padding: 5px 12px; border-bottom: 1px solid #eef1f7; align-items: baseline; font-size: 12px; }
.update-list li:last-child { border-bottom: none; }
.update-date { color: #6878a8; white-space: nowrap; flex-shrink: 0; font-size: 11px; }
.update-tag { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 2px; white-space: nowrap; flex-shrink: 0; }
.tag-new    { background: #c03030; color: #fff; }
.tag-update { background: #1a3878; color: #fff; }
.tag-info   { background: #3a4870; color: #fff; }
.update-list a { color: #1a2030; }
.update-list a:hover { color: #1a3878; }

/* ===== GAME CARDS ===== */
.game-list { padding: 10px 12px; display: flex; flex-direction: column; gap: 10px; }
.game-item { display: flex; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid #e8eef8; align-items: flex-start; }
.game-item:last-child { border-bottom: none; padding-bottom: 0; }
.game-cover { width: 100px; height: 72px; background: linear-gradient(135deg,#d8e4f8,#c0d0f0); flex-shrink: 0; border: 1px solid #ccd8f0; border-radius: 3px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #6878a8; position: relative; overflow: hidden; }
.game-cover-chibi { position: absolute; bottom: 0; right: 4px; }
.game-title-text { font-size: 17px; font-weight: 700; color: #1a2030; margin-bottom: 3px; line-height: 1.3; }
.game-title-text a { color: inherit; }
.game-title-text a:hover { color: #1a3878; text-decoration: none; }
.game-meta { font-size: 11px; color: #6878a8; margin-bottom: 5px; }
.game-desc { font-size: 12px; color: #2a3050; line-height: 1.75; }
.game-links { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.game-link { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 3px; border: 1px solid; text-decoration: none; }
.game-link:hover { opacity: .8; text-decoration: none; }
.gl-synopsis { color: #1a3878; border-color: #a0b8e0; background: #f0f4fc; }
.gl-route    { color: #1e4870; border-color: #90b8d8; background: #f0f6fc; }
.gl-chara    { color: #243a70; border-color: #a8c0e8; background: #f2f6fd; }
.gl-review   { color: #303888; border-color: #a8b0e0; background: #f4f4fd; }

/* ===== RIGHT COLUMN ===== */
.ad-placeholder { background: #e4eaf8; border: 1px dashed #b0c0e0; border-radius: 3px; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; color: #8898c070; font-size: 10px; text-align: center; line-height: 1.5; }
.ad-tall  { height: 260px; }
.ad-small { height: 110px; }

/* ===== RIGHT COLUMN AD ZONE (PR一括ラベル・FANZA+DLsite共通枠) ===== */
.right-ad-zone {
  position: relative;
  padding: 16px 6px 6px;
  margin-bottom: 8px;
  background: #f8f9fc;
  border: 1px solid #d8e0ec;
  border-radius: 4px;
}
.right-ad-zone-pr {
  position: absolute; top: 4px; left: 5px;
  background: #d8d8e0; color: #6a7090;
  font-size: 8px; font-weight: 700;
  padding: 1px 5px; border-radius: 2px;
  letter-spacing: 0.05em;
  line-height: 1;
  z-index: 1;
}

/* ===== RIGHT COLUMN AD BOX ===== */
.right-ad-box {
  display: flex; flex-direction: column; gap: 2px;
  position: relative;
  padding: 8px;
  margin-bottom: 6px;
  background: #fff;
  border: 1px solid #ccd8f0;
  border-radius: 3px;
  text-decoration: none;
  text-align: center;
  transition: transform 150ms, box-shadow 150ms, border-color 150ms;
  overflow: hidden;
}
.right-ad-box:last-child { margin-bottom: 0; }
a.right-ad-box:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(192,48,80,0.18);
  text-decoration: none;
}
.right-ad-headline {
  font-size: 12px; font-weight: 700;
  color: #1a2030;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.right-ad-subline {
  font-size: 11px; font-weight: 700;
  color: #c83060;
  line-height: 1.3;
  letter-spacing: 0.03em;
}
.right-ad-meta {
  display: flex; flex-wrap: wrap; gap: 4px;
  justify-content: center; align-items: center;
  margin-top: 3px;
}
.right-ad-badge {
  background: #c83060; color: #fff;
  font-size: 9px; font-weight: 700;
  padding: 1px 6px; border-radius: 8px;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.right-ad-deadline {
  font-size: 9px; font-weight: 700;
  color: #d04030;
  background: #fff0f0;
  border: 1px solid #f0c0c0;
  border-radius: 2px;
  padding: 1px 4px;
  letter-spacing: 0.04em;
  line-height: 1.3;
}
.right-ad-cta {
  font-size: 10px; font-weight: 700;
  color: #fff;
  background: #c83060;
  padding: 4px 6px;
  border-radius: 2px;
  margin-top: 5px;
  letter-spacing: 0.04em;
}
a.right-ad-box:hover .right-ad-cta { background: #a82048; }

/* テーマ別配色 */
.right-ad-box--fanza { border-color: #f0c8d8; background: linear-gradient(180deg, #fff 0%, #fff5f8 100%); }
.right-ad-box--fanza .right-ad-headline { color: #c83060; }
.right-ad-box--dlsite { border-color: #b8d8f0; background: linear-gradient(180deg, #fff 0%, #f0f5fc 100%); }
.right-ad-box--dlsite .right-ad-badge { background: #1e6cb8; }
.right-ad-box--dlsite .right-ad-headline { color: #1e6cb8; }
.right-ad-box--dlsite .right-ad-subline { color: #1e6cb8; }
.right-ad-box--dlsite .right-ad-cta { background: #1e6cb8; }
a.right-ad-box--dlsite:hover .right-ad-cta { background: #145090; }
.right-ad-box--amazon { border-color: #f0d8b0; background: linear-gradient(180deg, #fff 0%, #fffaf2 100%); }
.right-ad-box--amazon .right-ad-headline { color: #c07000; }
.right-ad-box--amazon .right-ad-subline { color: #7a5000; }
.right-ad-box--amazon .right-ad-cta { background: #c07000; }
a.right-ad-box--amazon:hover .right-ad-cta { background: #995800; }

/* ===== BRANCHED AD (複数CTAボタン) ===== */
.right-ad-box--branched {
  cursor: default;
}
.right-ad-branches {
  display: flex; gap: 4px;
  margin-top: 5px;
}
.right-ad-branch {
  flex: 1;
  font-size: 11px; font-weight: 700;
  color: #fff;
  padding: 6px 4px;
  border-radius: 2px;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.04em;
  transition: background 150ms, transform 100ms;
}
.right-ad-branch:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.right-ad-branch--fanza { background: #c83060; }
.right-ad-branch--fanza:hover { background: #a82048; }
.right-ad-branch--dlsite { background: #1e6cb8; }
.right-ad-branch--dlsite:hover { background: #145090; }
.right-ad-branch--default { background: #4a6090; }
.right-ad-branch--default:hover { background: #324870; }

/* ===== AD ZONE FOOTER TEXT (スマホ向けテキスト広告) ===== */
.ad-zone-footer-text {
  display: none; /* PCでは非表示（右カラムに同内容が出るため） */
  max-width: 1080px;
  margin: 16px auto 0;
  padding: 10px 12px 12px;
  background: #fafbfd;
  border-top: 1px solid #e4eaf4;
  border-bottom: 1px solid #e4eaf4;
}
.ad-zone-footer-text .right-ad-zone {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px;
  margin-bottom: 0;
}
.ad-zone-footer-text .right-ad-box {
  width: 280px; max-width: 100%;
  margin: 0 auto;
}
@media (max-width: 780px) {
  .ad-zone-footer-text { display: block; }
  .ad-zone-footer-text .right-ad-box { width: 100%; }
}

/* ===== AD ZONE FOOTER (フッター直前グラフィカル広告) ===== */
.ad-zone-footer {
  max-width: 1080px;
  margin: 24px auto 0;
  padding: 8px 12px 12px;
  background: #f4f6fa;
  border-top: 1px solid #dce4f0;
  border-bottom: 1px solid #dce4f0;
  text-align: center;
}
.ad-zone-pr {
  font-size: 9px; font-weight: 700;
  color: #8898b8;
  letter-spacing: 0.1em;
  text-align: left;
  margin-bottom: 6px;
}
.ad-zone-body {
  display: flex; flex-wrap: wrap; gap: 12px;
  justify-content: center; align-items: center;
}
.ad-zone-slot {
  display: inline-block;
  max-width: 100%;
}
.ad-zone-slot img {
  max-width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 780px) {
  .ad-zone-footer { margin-top: 16px; padding: 6px 8px 10px; }
}
.right-box { background: #fff; border: 1px solid #ccd8f0; border-radius: 3px; margin-bottom: 8px; overflow: hidden; }
.right-box-head { background: #2e4880; color: #d8e4f8; font-size: 11px; font-weight: 700; padding: 5px 10px; }
.right-box-body { padding: 8px 10px; font-size: 11px; color: #1a2030; line-height: 2; }
.right-box-body ul { list-style: none; }
.right-box-body li { border-bottom: 1px dotted #dce8f8; padding: 2px 0; }
.right-box-body li:last-child { border-bottom: none; }
.right-box-body a { color: #1a2030; }
.right-box-body a:hover { color: #1a3878; }
/* タブ */
.rbox-tabs { display: flex; border-bottom: 2px solid #ccd8f0; margin-bottom: 0; }
.rbox-tab {
  flex: 1; padding: 6px 0; font-size: 11px; font-weight: 700;
  border: 1px solid transparent; border-bottom: none;
  margin-bottom: -2px;
  background: #e8eef8; color: #8898b8; cursor: pointer;
  font-family: 'Noto Sans JP', sans-serif; transition: background 120ms, color 120ms;
  border-radius: 4px 4px 0 0;
}
.rbox-tab:hover { background: #dce6f4; color: #1a3878; }
.rbox-tab--active {
  background: #fff; color: #1a2e5a;
  border-color: #ccd8f0; border-bottom-color: #fff;
}
.rbox-tab[data-tab="spoiler"].rbox-tab--active { color: #c0303a; border-top-color: #c0303a; }
.rbox-panel ul { list-style: none; padding: 4px 0; }
.rbox-panel li { border-bottom: 1px dotted #dce8f8; padding: 2px 10px; font-size: 11px; }
.rbox-panel li:last-child { border-bottom: none; }
.rbox-panel a { color: #1a2030; }
.rbox-panel a:hover { color: #1a3878; }
.rbox-panel a.active { color: #1a3878; font-weight: 700; }
.rbox-item--sub { border-bottom: 1px dotted #dce8f8; }
.rbox-item--sub a { padding-left: 20px; color: #5a6888; font-size: 10px; }
.rbox-item--sub a:hover { color: #1a3878; }

/* ===== 記事日付（各ページ末尾・青帯より上） ===== */
.page-dates {
  font-size: 11px;
  color: #8898b8;
  text-align: right;
  padding: 8px 2px 4px;
  border-top: 1px dotted #dce8f0;
  margin-top: 14px;
}

/* ===== FOOTER ===== */
.site-footer { background: #1a2e5a; border-top: 2px solid #4a70c0; color: #5870a8; font-size: 11px; text-align: center; padding: 18px; margin-top: 16px; }
.site-footer a { color: #6878a8; }

/* ===== UTILITIES ===== */
.text-meta { color: #6878a8; }
.text-small { font-size: 11px; }
