/* AdminLTE theme tweaks for story_lab (MkDocs custom theme). */

/* Search */
.sl-search {
  position: relative;
}
#sl-search-results {
  min-width: 22rem;
  max-height: 65vh;
  overflow-y: auto;
}

/* Content area */
.sl-content img {
  max-width: 100%;
  height: auto;
}
.sl-content table {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
  overflow-x: auto;
  border-collapse: collapse;
}
.sl-content table th,
.sl-content table td {
  padding: .5rem .75rem;
  border: 1px solid #dee2e6;
}
.sl-content table thead th {
  border-bottom-width: 2px;
  background-color: rgba(0, 0, 0, .05);
}
.sl-content pre {
  padding: .75rem;
  border-radius: .25rem;
  background-color: #f6f8fa;
}
.sl-content pre code.hljs {
  padding: 0;
  background: transparent;
}
.sl-content blockquote {
  padding: .5rem 1rem;
  border-left: .25rem solid #dee2e6;
  color: #6c757d;
}

/* Dark mode adjustments */
.dark-mode .sl-content table th,
.dark-mode .sl-content table td {
  border-color: #454d55;
}
.dark-mode .sl-content table thead th {
  background-color: rgba(255, 255, 255, .05);
}
.dark-mode .sl-content pre {
  background-color: #2d333b;
}
.dark-mode .sl-content blockquote {
  border-left-color: #454d55;
  color: #adb5bd;
}

/* Right-hand TOC in the control sidebar */
.sl-toc .nav-link {
  padding: .15rem .5rem;
  font-size: .9rem;
}
.sl-toc .sl-toc {
  padding-left: 1rem;
}

/* Tags index (material/tags plugin) */
.md-tag {
  display: inline-block;
  padding: .15em .7em;
  border-radius: 1em;
  background-color: #17a2b8;
  color: #fff;
  font-size: .8em;
  font-weight: 600;
}
.sl-tag-table {
  max-width: 48rem;
}
.sl-tag-table td,
.sl-tag-table th {
  white-space: nowrap;
}
.sl-tag-table td:first-child,
.sl-tag-table th:first-child {
  white-space: normal;
  width: 100%;
}
.dark-mode .md-tag {
  background-color: #1f6f8b;
}

/* 絵一覧ギャラリー */
.sl-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin: 1em 0;
}
.sl-card {
  display: block;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  transition: transform .15s ease, box-shadow .15s ease;
  color: inherit;
}
.sl-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  text-decoration: none;
  color: inherit;
}
.sl-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.sl-card-date {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 18px 10px 6px;
  font-size: .82em;
  color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.72));
}

.sl-card-hidden {
  display: none;
}
.sl-gallery-more {
  display: block;
  margin: 12px auto;
  padding: 8px 28px;
  border: 1px solid #17a2b8;
  border-radius: 20px;
  background: transparent;
  color: #17a2b8;
  font-size: .9em;
  cursor: pointer;
}
.sl-gallery-more:hover {
  background: #17a2b8;
  color: #fff;
}

/* トップページ: 最新日ヒーロー */
.sl-hero {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  margin: 1em 0;
  color: #fff;
}
.sl-hero:hover {
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.sl-hero img {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
}
.sl-hero-cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 30px 14px 10px;
  font-size: 1.05em;
  background: linear-gradient(transparent, rgba(0,0,0,.75));
}
.sl-hero-badge {
  background: #17a2b8;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: .78em;
  margin-right: 4px;
}

/* 日付ページ: 前日/次日ナビ */
.sl-daynav {
  display: flex;
  justify-content: space-between;
  margin: 1em 0;
}
.sl-daynav-link {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #17a2b8;
  border-radius: 20px;
  color: #17a2b8;
  font-size: .9em;
}
.sl-daynav-link:hover {
  background: #17a2b8;
  color: #fff;
  text-decoration: none;
}

/* 小説ページ: 画像キャプション(元の絵/物語から生まれた絵) */
.sl-fig {
  margin: 1em 0;
}
.sl-fig img {
  display: block;
  width: 100%;
  height: auto;
}
.sl-fig figcaption {
  font-size: .8em;
  color: #6c757d;
  margin-top: .4em;
  text-align: center;
}
.dark-mode .sl-fig figcaption {
  color: #aaa;
}

/* シェアボタン間隔 */
.sl-share {
  display: flex;
  gap: 8px;
}

/* 人格カラーバッジ */
.sl-pbadge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  background: #6c757d;
  color: #fff;
  font-size: .8em;
  font-weight: bold;
  white-space: nowrap;
}
.sl-p01 { background: #2e9e5b; } /* 一葉 */
.sl-p02 { background: #1e88e5; } /* 理人 */
.sl-p03 { background: #f39c12; } /* 陽太 */
.sl-p04 { background: #e83e8c; } /* 彩乃 */
.sl-p05 { background: #6f42c1; } /* 蓮 */
.sl-siblings .sl-pbadge, .sl-persona-nav .sl-pbadge { font-size: .75em; }
td .sl-pbadge { font-size: .75em; }

/* 縦書きモード(小説ページ) */
#sl-vertical-toggle.active { color: #17a2b8; }
.sl-content.sl-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  height: 72vh;
  overflow-x: auto;
  overflow-y: hidden;
  font-family: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", "YuMincho", "MS Mincho", "MS PMincho", serif;
  line-height: 2.1;
  letter-spacing: .08em;
}
.sl-content.sl-vertical img {
  max-height: 40vh;
  width: auto;
  max-width: none;
}
.sl-content.sl-vertical p { text-indent: 1em; }

/* ページタイトル表示(md側の # 見出しと重複しないよう h1 ではなく p で描画) */
.sl-page-title { font-size: 1.8rem; font-weight: 500; }
