@charset "utf-8";

/* ずぼログギャラリー用スタイル */

:root {
	--main-text-color: #333;
	--accent: #63b8d1;
	--radius: 1rem;
	--text-color-70: color-mix(in srgb, var(--main-text-color) 70%, transparent);
	--radius-50: calc( var(--radius) * 0.5 );
}

/* ギャラリーグリッド本体 */
.zubolog{
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	list-style-type: none;
	padding-left: 0;
	margin: 0; /* 04raspberryのデフォルトのulマージンを打ち消し */
	text-align: center;
}
.zubolog li {
	margin: 0; /* 04raspberryのグローバルliマージンを打ち消し */
	padding: 0;
}
.zubolog a{
	display: block;
	overflow: hidden;
}
.zubolog img{
	aspect-ratio: 1 / 1;
	display: block;
	object-fit: cover;
	object-position: top center;
	width: 100%;
	margin: 0; /* 04raspberryのデフォルト画像マージン(上下16px)を打ち消し */
	padding: 0;
}
.zubolog div{
	color: var(--text-color-70);
	font-size: 0.8em;
	line-height: 1.5;
}
.zubolog div:not(:empty){
	padding-top: 0.3em;
}

/* mini_img クラス */
.mini_img{
	gap: 5px;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
}
.mini_img div{
	display: none;
}

/* キャプションなし */
.no_caption div{
	display: none;
}

/* 角丸 (kadomaru) */
.kadomaru a,
.kadomaru img{
	border-radius: var(--radius-50);
}

/* マウスオーバーで透過 (translucent) */
ul.translucent a{
	background-color: var(--accent);
}
ul.translucent img{
	opacity: 0.7;
	transition: opacity 0.3s ease-in-out;
}
ul.translucent a:hover img{
	opacity: 1;
}

/* ============================================================
   NSFW ぼかし制御
   caption.csv の caption2 列に "nsfw" と記述した画像に適用
   ============================================================ */

/* NSFWサムネイル：デフォルトでblur */
ul li a.nsfw {
  position: relative;
}

ul li a.nsfw img {
  filter: blur(16px);
  transition: filter 0.3s ease;
}

/* PCのみ：ホバーでぼかし解除 */
@media (hover: hover) and (pointer: fine) {
  ul li a.nsfw:hover img {
    filter: blur(0);
  }
}

/* JS で .revealed クラスが付いたら解除（スマホ対応） */
ul li a.nsfw.revealed img {
  filter: blur(0);
}

/* R18バッジ表示 */
ul li a.nsfw::after {
  content: "R18";
  position: absolute;
  top: 6px;
  left: 6px;
  background: rgba(180, 0, 0, 0.85);
  color: #fff;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  z-index: 10;
}

/* revealed後のバッジを非表示 */
ul li a.nsfw.revealed::after {
  display: none;
}


/* レスポンシブ (スマホ表示時の列数調整) */
@media (max-width: 600px) {
	.mini_img{
		grid-template-columns: repeat(4,1fr);
	}
}
