/* ============================================================
   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-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; }

/* ===== 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; }
