/*
Theme Name: pawlatch
Theme URI: https://petspot.com
Author: hyodorantaro
Description: pawlatch（パウラッチ / petspot.com）専用テーマ。正方形の写真を3列に敷き詰めるモザイク型のレイアウト。
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: petspot
*/

/* ============================================================
   pawlatch ─ モザイク型
   動物の写真は縦横どちらで撮られているか分からないので、
   正方形に切りそろえて敷き詰める。角は大きく丸め、余白を広めに取る。
   ============================================================ */
:root {
	--ink:     #3a2b2b;
	--sub:     #8b7a76;
	--line:    #ece2dd;
	--bg:      #fffaf7;
	--card:    #ffffff;
	--accent:  #e2624a;
	--accent2: #5f9ea0;
	--footer:  #3a2b2b;
	--wrap:    1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0; background: var(--bg); color: var(--ink);
	font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
	/* clip にしているのは hidden だとスクロール容器ができて、
	   ヘッダーのカテゴリバーの position: sticky が効かなくなるため。 */
	font-size: 16px; line-height: 1.95; overflow-x: clip;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.4; }
p { margin: 0 0 1em; }
button, input { font: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.w-wrap { display: block; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.t-right { text-align: right; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.w-skip { position: absolute; left: -9999px; }
.w-skip:focus { left: 8px; top: 8px; z-index: 99; background: var(--accent); color: #fff; padding: 10px 16px; }

/* ---------- 検索 ---------- */
.c-search { display: flex; }
.c-search-input {
	background: var(--card); border: 1px solid var(--line); border-right: none; color: var(--ink);
	padding: 8px 14px; width: 168px; font-size: 14px; border-radius: 999px 0 0 999px;
}
.c-search-input::placeholder { color: var(--sub); }
.c-search-btn {
	background: var(--accent); border: 1px solid var(--accent); color: #fff;
	padding: 9px 13px; cursor: pointer; display: flex; border-radius: 0 999px 999px 0;
}

/* ---------- パンくず ---------- */
.c-crumbs { font-size: 12px; color: var(--sub); padding-top: 14px; }
.c-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; }
.c-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--line); }
.c-crumbs a:hover { color: var(--accent); }

/* ---------- バッジ・チップ ---------- */
.c-badge {
	display: inline-block; background: var(--badge-color, var(--accent)); color: #fff;
	font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 18px;
}
.c-new { display: inline-block; background: var(--ink); color: #fff; font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 18px; }
.c-thumb-fallback {
	display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
	background: linear-gradient(130deg, var(--badge-color, var(--accent)), var(--ink));
}
.c-thumb-fallback span { color: rgba(255,255,255,.85); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-align: center; padding: 6px; }
.c-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.c-chip { font-size: 11.5px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 18px; color: var(--sub); background: var(--card); }
.c-chip:hover { border-color: var(--accent); color: var(--accent); }
.c-chip-count { margin-left: 4px; opacity: .6; }
.c-count { font-size: 12px; color: var(--sub); margin-top: 8px; }
.c-post-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 30px; }

/* ---------- 出典・注意書き・共有 ---------- */
.c-source { margin-top: 26px; padding: 15px 18px; background: var(--card); border-left: 4px solid var(--accent); font-size: 13px; }
.c-source-title { font-size: 11px; font-weight: 900; letter-spacing: .14em; color: var(--sub); margin: 0 0 6px; }
.c-source-note { color: var(--sub); }
.c-disclaimer { margin-top: 24px; padding: 15px 18px; background: var(--card); border-left: 4px solid var(--line); font-size: 12.5px; color: var(--sub); }
.c-disclaimer-title { font-size: 11px; font-weight: 900; letter-spacing: .14em; color: var(--ink); margin: 0 0 6px; }
.c-disclaimer p:last-child { margin-bottom: 0; }
.c-share { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.c-share-label { font-size: 11px; font-weight: 900; letter-spacing: .16em; color: var(--sub); }
.c-share-btn { font-size: 12.5px; padding: 7px 15px; border: 1px solid var(--line); background: var(--bg); border-radius: 18px; }
.c-share-btn:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 関連記事 ---------- */
.c-related { margin-top: 44px; }
.c-block-title { font-size: 12px; letter-spacing: .2em; font-weight: 900; color: var(--sub); margin-bottom: 16px; }
.c-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.c-related-item { display: block; }
.c-related-thumb { display: block; aspect-ratio: 16 / 10; overflow: hidden; margin-bottom: 8px; border-radius: 18px; background: var(--card); }
.c-related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-related-body { display: block; }
.c-related-cat { display: block; font-size: 10.5px; color: var(--accent); font-weight: 900; margin-bottom: 3px; }
.c-related-title { display: block; font-size: 14px; font-weight: 800; line-height: 1.5; }
.c-related-item:hover .c-related-title { color: var(--accent); }
.c-comments { margin-top: 42px; padding-top: 24px; border-top: 2px solid var(--ink); }

/* ---------- サイドバー ---------- */
.w-side { display: flex; flex-direction: column; gap: 20px; }
.c-widget { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; }
.c-widget-title { font-size: 11px; letter-spacing: .2em; font-weight: 900; margin: 0 0 12px; padding-bottom: 9px; border-bottom: 2px solid var(--ink); }
.c-rank li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.c-rank li:last-child { border-bottom: none; }
.c-rank-num {
	flex: none; width: 21px; height: 21px; background: var(--accent); color: #fff;
	font-size: 11px; font-weight: 900; display: flex; align-items: center; justify-content: center; border-radius: 18px;
}
.c-rank-link { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 10px; align-items: start; }
.c-rank-thumb { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 18px; }
.c-rank-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-rank-noimg { display: block; width: 100%; height: 100%; background: var(--line); }
.c-rank-title { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; line-height: 1.5; }
.c-rank a:hover { color: var(--accent); }
.c-cat-list li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.c-cat-list li:last-child { border-bottom: none; }
.c-cat-list a { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 800; }
.c-cat-list a:hover { color: var(--accent); }
.c-cat-count { font-size: 11px; color: var(--sub); font-weight: 500; }
.c-cat-desc { display: block; font-size: 11px; color: var(--sub); }

/* ---------- 記事本文 ---------- */
.w-content { overflow-wrap: anywhere; font-size: 16px; line-height: 1.95; }
.w-content > * + * { margin-top: 1.1em; }
.w-content h2 { font-size: 22px; font-weight: 900; margin: 1.9em 0 .6em; background: var(--card); padding: 10px 16px; border-radius: 12px; }
.w-content h3 { font-size: 18px; margin: 1.6em 0 .5em; color: var(--accent); }
.w-content ul li { list-style: disc; margin-left: 1.4em; margin-bottom: .4em; }
.w-content ol li { list-style: decimal; margin-left: 1.5em; margin-bottom: .4em; }
.w-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
/* 本文の写真は元の大きさを超えて引き伸ばさない。
   プレスリリースには小さな画像も混ざるため、拡大するとぼやけるため。 */
.w-content img { margin: 1.6em auto; max-width: 100%; height: auto; border-radius: 18px; }
.w-content figure { margin: 1.6em 0; text-align: center; }
.w-content figure img { margin: 0 auto; }
.w-content figcaption { font-size: 12px; color: var(--sub); margin-top: 8px; }
.w-content table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.w-content th, .w-content td { border: 1px solid var(--line); padding: 10px 13px; text-align: left; }
.w-content th { background: var(--card); width: 30%; }
.w-content blockquote { border-left: 4px solid var(--accent); padding: 12px 18px; background: var(--card); color: var(--sub); }
.w-content code { background: var(--card); padding: 2px 6px; font-size: .92em; }

/* ---------- 固定ページ・404 ---------- */
/* 記事の先頭に置く写真。小さい画像は引き伸ばさず、下地の上で中央に置く */
.w-single-thumb { background: var(--card); text-align: center; }
.w-single-thumb img { margin: 0 auto; }

.c-page { padding: 36px 0 66px; }
.c-page-inner { max-width: 800px; margin: 0 auto; background: var(--bg); padding: 30px 36px 40px; border: 1px solid var(--line); border-radius: 18px; }
.c-page-title { font-size: 28px; font-weight: 900; margin: 0 0 20px; padding-bottom: 14px; border-bottom: 3px solid var(--ink); }
.c-page-body { overflow-wrap: anywhere; font-size: 16px; line-height: 1.95; }
.c-page-body h2 { font-size: 20px; margin: 1.8em 0 .5em; color: var(--accent); }
.c-page-body ul li { list-style: disc; margin-left: 1.4em; margin-bottom: .3em; }
.c-page-body a { color: var(--accent); text-decoration: underline; }
.c-404 { text-align: center; }
.c-404-code { font-size: 70px; font-weight: 900; color: var(--accent); margin: 0; line-height: 1; }
.c-404 .c-search { justify-content: center; margin: 20px 0; }
.c-404-home { color: var(--accent); text-decoration: underline; font-weight: 800; }

/* ---------- 一覧の見出し・ページ送り ---------- */
.w-arc-head { margin-bottom: 24px; }
.w-arc-head h1 { font-size: 28px; font-weight: 900; margin: 0 0 6px; }
.w-arc-head p { color: var(--sub); font-size: 14px; margin: 0; }
.w-empty { background: var(--card); border: 1px dashed var(--line); padding: 40px 20px; text-align: center; color: var(--sub); border-radius: 18px; }
.w-pager { margin-top: 34px; }
.w-pager .page-numbers {
	display: inline-block; min-width: 38px; text-align: center; padding: 8px 12px; margin: 0 4px 6px 0;
	background: var(--bg); border: 1px solid var(--line); font-size: 14px; border-radius: 18px;
	font-variant-numeric: tabular-nums;
}
.w-pager .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.w-pager .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 900; }


/* ---------- フッター ----------
   ページのクリーム地を少し濃くした帯。暗い箱にせず、ヘッダーと同じトーンで締める。 */
.w-footer {
	margin-top: 28px;
	padding: 36px 0 28px;
	background: linear-gradient(180deg, #f7efe9 0%, #f3e8e1 100%);
	border-top: 1px solid var(--line);
	color: var(--ink);
}
.w-footer a { color: inherit; }
.w-footer-main {
	display: flex; flex-direction: column; align-items: center; text-align: center;
	gap: 12px; padding-bottom: 28px;
}
.w-footer-brand { display: inline-block; line-height: 0; }
.w-footer-brand img { width: auto; height: 48px; }
.w-footer-tag {
	margin: 0; font-size: 13px; color: var(--sub); letter-spacing: .04em;
}
.w-footer-nav ul {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
	list-style: none; margin: 6px 0 0; padding: 0;
}
.w-footer-nav a {
	display: block; padding: 7px 14px; border-radius: 999px;
	font-size: 12.5px; font-weight: 800; color: var(--sub);
	background: var(--card); border: 1px solid var(--line);
	transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.w-footer-nav a:hover {
	color: #fff; background: var(--c, var(--accent)); border-color: var(--c, var(--accent));
}
.w-footer-bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
}
.w-footer-copy { margin: 0; font-size: 12px; color: var(--sub); }
.w-totop {
	flex: none; font-size: 12px; font-weight: 800; color: var(--sub);
	padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card);
}
.w-totop:hover { color: #fff; background: var(--ink); border-color: var(--ink); }
@media (max-width: 560px) {
	.w-footer { padding: 28px 0 22px; margin-top: 16px; }
	.w-footer-brand img { height: 42px; }
	.w-footer-nav a { padding: 6px 12px; font-size: 12px; }
	.w-footer-bar { flex-direction: column; gap: 10px; }
}

@media (max-width: 900px) {
	.c-related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
	body { font-size: 15px; }
	.w-wrap { padding: 0 14px; }
	.c-related-grid { grid-template-columns: 1fr; }
	.c-page-inner { padding: 22px 18px 28px; }
	.c-page-title { font-size: 22px; }
	.w-arc-head h1 { font-size: 21px; }
	.w-content { font-size: 15px; }
	.w-content h2 { font-size: 19px; }
	/* 本文の表は横スクロール（列を潰すと項目と値の対応が読めなくなるため） */
	.w-content table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.c-flow-track { animation: none; }
}

/* ---------- 編集部おすすめ ----------
   PCは写真＋見出しの横並びで帯を細く。
   スマホは写真を上に大きくして、何の記事かがひと目で分かるようにする。 */
.c-flow { background: #fdf1ec; border-bottom: 1px solid var(--line); padding: 8px 0 10px; overflow: hidden; }
.c-flow-head { margin-bottom: 6px; }
.c-flow-label {
	margin: 0; font-size: 10.5px; font-weight: 900; letter-spacing: .16em; color: var(--accent);
}
.c-flow-viewport { overflow: hidden; }
.c-flow-track { display: flex; gap: 10px; width: max-content; animation: w-flow var(--flow-duration, 40s) linear infinite; }
@keyframes w-flow { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.c-flow-viewport:hover .c-flow-track { animation-play-state: paused; }
.c-flow-card {
	display: flex; align-items: center; gap: 10px; width: 228px; flex: none;
	background: var(--card); border-radius: 12px; overflow: hidden; padding: 5px 10px 5px 5px;
}
.c-flow-thumb {
	display: block; width: 52px; height: 52px; flex: none; overflow: hidden;
	border-radius: 9px; background: var(--line);
}
.c-flow-thumb img { width: 100%; height: 100%; object-fit: cover; }
.c-flow-card-title { display: block; font-size: 12px; font-weight: 800; line-height: 1.4; padding: 0; min-width: 0; }
.c-flow-card-titletext { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.c-flow-card:hover .c-flow-card-title { color: var(--accent); }
@media (max-width: 760px) {
	.c-flow { padding: 12px 0 14px; }
	.c-flow-head { padding: 0 14px; margin-bottom: 10px; }
	.c-flow-label { font-size: 12px; letter-spacing: .12em; }
	.c-flow-track { gap: 12px; padding: 0 14px; }
	.c-flow-card {
		display: block; width: 148px; padding: 0;
		border-radius: 14px; overflow: hidden;
	}
	.c-flow-thumb {
		width: 100%; height: auto; aspect-ratio: 1 / 1;
		border-radius: 0; margin: 0;
	}
	.c-flow-card-title {
		font-size: 13px; line-height: 1.45;
		padding: 10px 11px 12px;
	}
	.c-flow-card-titletext { -webkit-line-clamp: 3; }
}


/* ============================================================
   仕上げの層 ─ 文字組み・動き・操作の手がかり
   サイトごとの色と形はそのままに、読み心地と操作感だけを底上げする。
   全サイトで同じ内容が入っている（生成元は _generator/newskins.py）。
   ============================================================ */
:root {
	--ease: cubic-bezier(.22, .68, .2, 1);
	--dur:  .26s;
}

/* ---------- 日本語の字組み ----------
   「」（）などの約物は左右に余白を持っているため、そのままだと
   見出しが間延びする。palt で詰めて、行頭・行末のそろいを良くする。 */
h1, h2, h3,
.c-badge, .c-new, .c-chip, .c-widget-title,
.c-rank-title, .c-related-title,
.w-content, .c-page-body {
	font-feature-settings: "palt" 1;
}
/* 見出しは行ごとの長さがそろうように折り返す */
h1, h2, h3 { text-wrap: balance; }
/* 本文は最後の1行が1文字だけ残らないようにする */
p, li, figcaption, .c-rank-title, .c-related-title { text-wrap: pretty; }
/* 日付・件数・順位の数字は幅をそろえて、縦に並べたときにずれないようにする */
time, .c-count, .c-rank-num, .c-cat-count, .c-chip-count, .w-pager .page-numbers {
	font-variant-numeric: tabular-nums;
}

/* ---------- 動き ----------
   速さと曲線を1か所にまとめ、サイト間でばらつかないようにする。 */
a, button, input, .c-chip, .c-badge {
	transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease),
		border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
main article {
	transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
		border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
main article:hover { transform: translateY(-3px); }
main article img { transition: transform .55s var(--ease); }

/* 画面に入ってきた記事を、下から少しだけ持ち上げて出す。
   transform ではなく translate を使うのは、ホバーの持ち上げと衝突させないため。 */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		main article {
			animation: pol-rise linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 40%;
		}
		@keyframes pol-rise {
			from { opacity: 0; translate: 0 16px; }
			to   { opacity: 1; translate: none; }
		}
	}
}
@media (prefers-reduced-motion: reduce) {
	main article, main article img, a, button { transition: none; }
	main article:hover { transform: none; }
}

/* ---------- 操作の手がかり ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--accent); color: #fff; }
.c-search-input:focus {
	outline: none; border-color: var(--accent); position: relative; z-index: 1;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}
.c-search-btn:hover { filter: brightness(1.08); }

/* ---------- 写真 ----------
   白地の商品写真は輪郭が消えるので、内側に細い線を1本回す。 */
.c-rank-thumb, .c-related-thumb { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 10%, transparent); }

/* ---------- 読み物としての細部 ---------- */
.w-content a {
	text-decoration-thickness: 1px; text-underline-offset: 4px;
	text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
	transition: text-decoration-color var(--dur) var(--ease);
}
.w-content a:hover { text-decoration-color: var(--accent); }
.w-content h2, .w-content h3 { letter-spacing: .005em; }
.w-content > p:first-of-type { font-size: 1.04em; }
.c-widget + .c-widget { margin-top: 0; }
.c-rank li { align-items: center; }
.c-rank-num { flex: none; }

/* ---------- ページ送り ----------
   指で押す前提で、当たり判定を大きく取る。 */
.w-pager .page-numbers {
	min-height: 42px; min-width: 42px;
	display: inline-flex; align-items: center; justify-content: center;
}
.w-pager .page-numbers:not(.current):hover { transform: translateY(-1px); }

@media (max-width: 560px) {
	.w-pager .page-numbers { min-height: 44px; min-width: 44px; }
	main article:hover { transform: none; }
}

/* ---------- 部品の形（このサイト固有） ---------- */

/* ---------- ヘッダー ----------
   上段にロゴと検索、下段にカテゴリのバー。
   カテゴリのバーだけを画面上部に残す（記事を読み終えた位置から、
   スクロールを戻さずに次のカテゴリへ移れるようにするため）。 */
.w-header { background: var(--card); }
.w-header-inner { display: flex; align-items: center; gap: 24px; padding-top: 15px; padding-bottom: 13px; }
/* ブランド名はロゴ画像に含まれているので、隣にはタグラインだけを置く。 */
.w-brand { display: flex; align-items: center; gap: 13px; flex: none; min-width: 0; }
.w-brand-logo { width: auto; height: 52px; }
.w-brand-sub {
	display: block; font-size: 11.5px; line-height: 1.5; color: var(--sub);
	padding-left: 13px; border-left: 1px solid var(--line);
}
.w-header-search { margin-left: auto; flex: none; }

.w-navbar {
	position: sticky; top: 0; z-index: 40;
	background: color-mix(in srgb, var(--card) 92%, transparent);
	backdrop-filter: blur(8px);
	border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.w-navbar > .w-wrap { padding-top: 7px; padding-bottom: 7px; }

/* カテゴリ：丸いタグを1列に並べる。 */
.w-nav {
	min-width: 0;
	overflow-x: auto; scrollbar-width: none; scroll-padding-left: 20px;
}
.w-nav::-webkit-scrollbar { display: none; }
.w-nav ul { display: flex; gap: 6px; }
.w-nav a {
	display: block; white-space: nowrap; padding: 6px 15px; border-radius: 999px;
	font-size: 13.5px; font-weight: 800; color: var(--sub); background: var(--bg);
}
.w-nav a:hover { color: var(--c, var(--accent)); background: color-mix(in srgb, var(--c, var(--accent)) 12%, var(--bg)); }
.w-nav a.is-on { background: var(--c, var(--accent)); color: #fff; }
.w-nav-home.is-on { background: var(--ink); color: #fff; }
.w-nav-home:hover { color: var(--accent); }

/* ---------- モザイク ---------- */
.w-latest { padding: 28px 0 60px; }
.w-sec { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 900; margin: 0 0 18px; }
.w-sec::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.w-mosaic { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.w-cell { position: relative; }
.w-cell-thumb {
	display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 18px;
	background: var(--line); margin-bottom: 12px;
}
.w-cell-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.w-cell:hover .w-cell-thumb img { transform: scale(1.05); }
.w-cell-top { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-bottom: 8px; }
.w-cell-title { font-size: 16px; font-weight: 800; line-height: 1.55; margin: 0 0 8px; }
.w-cell-title a::after { content: ""; position: absolute; inset: 0; }
.w-cell-top a { position: relative; z-index: 1; }
.w-cell-date { font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums; }
.w-cell:hover .w-cell-title { color: var(--accent); }

/* ---------- 記事ページ（1カラム。読むときは写真と本文だけにする） ---------- */
.w-single-wrap { padding: 26px 0 64px; }
.w-single-solo { display: block; }
.w-single { max-width: 780px; margin: 0 auto; }
.w-single-head { margin-bottom: 20px; }
.w-badges { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.w-single-head h1 { font-size: 29px; font-weight: 900; line-height: 1.45; margin: 0 0 12px; }
.w-single-meta { display: flex; flex-wrap: wrap; gap: 15px; font-size: 12px; color: var(--sub); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.w-single-thumb { margin: 0 0 24px; border-radius: 18px; overflow: hidden; }
.w-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 32px; font-size: 13.5px; }
.w-postnav a { display: block; padding: 13px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.w-postnav a:hover { border-color: var(--accent); color: var(--accent); }
.w-archive { padding: 24px 0 60px; }

/* 縦画面はロゴを画面中央・大きめに置く。
   検索はロゴの下に全幅で置き、ロゴを圧迫しないようにする。 */
@media (max-width: 900px) {
	.w-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.w-header-inner {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		align-items: center;
		gap: 10px 12px;
		padding-top: 14px;
		padding-bottom: 12px;
	}
	.w-brand { flex: none; width: 100%; justify-content: center; min-width: 0; }
	.w-brand-sub { display: none; }
	.w-brand-logo { height: 60px; margin: 0 auto; }
	.w-header-search {
		flex: 1 1 100%;
		margin-left: 0;
		display: flex;
		justify-content: center;
	}
	.c-search { width: 100%; max-width: 360px; }
	.c-search-input { flex: 1; width: auto; min-width: 0; font-size: 13px; padding: 9px 14px; }
	.c-search-btn { padding: 9px 14px; }
	/* 縦画面ではカテゴリのバーを1段のまま横スクロールさせる。
	   折り返して2段にすると、画面に残しているバーが本文を隠してしまう。
	   スクロールの端が画面の端まで届くように、余白はバー側で持つ。 */
	.w-navbar > .w-wrap { padding-left: 0; padding-right: 0; }
	.w-nav { padding: 0 14px; }
	.w-nav a { padding: 5px 12px; font-size: 12.5px; }
}
@media (max-width: 560px) {
	.w-mosaic { grid-template-columns: 1fr 1fr; gap: 14px; }
	.w-cell-title { font-size: 14px; }
	.w-cell-thumb { border-radius: 14px; margin-bottom: 9px; }
	.w-header-inner { padding-top: 12px; padding-bottom: 10px; gap: 8px; }
	.w-brand-logo { height: 56px; }
	.w-latest { padding: 16px 0 40px; }
	.w-single-head h1 { font-size: 21px; }
	.w-single-thumb { border-radius: 14px; }
	.w-postnav { grid-template-columns: 1fr; }
}

/* ---------- 個性：スポット ----------
   写真の右上に丸い印（スポット）を置く。
   色はその記事のカテゴリの色にして、並べたときの目印にする。 */
.w-cell-thumb { position: relative; }
.w-cell-thumb::after {
	content: ""; position: absolute; right: 12px; top: 12px; z-index: 2;
	width: 16px; height: 16px; border-radius: 50%;
	background: var(--c, var(--accent)); box-shadow: 0 0 0 4px rgba(255,255,255,.9);
}
.w-cell:hover .w-cell-thumb::after { box-shadow: 0 0 0 6px rgba(255,255,255,.95); }
.w-sec::before { box-shadow: 0 0 0 4px rgba(226,98,74,.18); }

@media (max-width: 560px) {
	.w-cell-thumb::after { right: 8px; top: 8px; width: 12px; height: 12px; box-shadow: 0 0 0 3px rgba(255,255,255,.9); }
}


/* ============================================================
   回遊のための並び
   注目 → ランキング → 新着 → カテゴリ別の横並び。
   どのブロックも「写真・カテゴリ名・見出し」の3点だけを見せて、
   1画面に入る記事の数を増やしている。
   ============================================================ */

/* 見出しに付ける小さな補足（「直近30日」「新しい順」など） */
.w-sec-note {
	font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--sub);
	padding: 2px 9px; background: var(--card); border: 1px solid var(--line); border-radius: 999px;
}

/* ---------- 注目（左に大きく1本、右に4本） ---------- */
.w-hero { padding: 20px 0 4px; }
.w-hero-inner { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.w-hero-lead { display: block; }
.w-hero-lead-thumb {
	display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 22px;
	background: var(--line); margin-bottom: 14px; position: relative;
}
.w-hero-lead-thumb img { width: 100%; height: 100%; object-fit: cover; }
.w-hero-lead:hover .w-hero-lead-thumb img { transform: scale(1.04); }
.w-hero-lead-body { display: block; }
.w-hero-lead-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.w-hero-pickup {
	font-size: 10px; font-weight: 900; letter-spacing: .18em; color: var(--sub);
}
.w-hero-lead-title {
	display: block; font-size: clamp(20px, 2.5vw, 27px); font-weight: 900; line-height: 1.45;
	margin-bottom: 9px; font-feature-settings: "palt" 1;
}
.w-hero-lead:hover .w-hero-lead-title { color: var(--c, var(--accent)); }
.w-hero-lead-text {
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 13.5px; line-height: 1.8; color: var(--sub); margin-bottom: 8px;
}
.w-hero-lead-date { display: block; font-size: 11.5px; color: var(--sub); font-variant-numeric: tabular-nums; }

.w-hero-subs { display: grid; gap: 12px; }
.w-hero-sub { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 13px; align-items: center; }
.w-hero-sub-thumb {
	display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 16px; background: var(--line);
}
.w-hero-sub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.w-hero-sub:hover .w-hero-sub-thumb img { transform: scale(1.06); }
.w-hero-sub-body { display: block; min-width: 0; }
.w-hero-sub-cat { display: block; font-size: 10.5px; font-weight: 900; color: var(--c, var(--accent)); margin-bottom: 4px; }
.w-hero-sub-title {
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 14px; font-weight: 800; line-height: 1.5; font-feature-settings: "palt" 1;
}
.w-hero-sub:hover .w-hero-sub-title { color: var(--c, var(--accent)); }

/* ---------- いま読まれている（順位つき） ---------- */
.w-rankrow-sec { padding: 30px 0 6px; }
.w-rankrow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.w-rankrow-item { display: block; }
.w-rankrow-thumb {
	display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden;
	border-radius: 16px; background: var(--line); margin-bottom: 9px;
}
.w-rankrow-thumb img { width: 100%; height: 100%; object-fit: cover; }
.w-rankrow-item:hover .w-rankrow-thumb img { transform: scale(1.06); }
.w-rankrow-num {
	position: absolute; left: 8px; bottom: 8px; z-index: 2;
	display: flex; align-items: center; justify-content: center;
	width: 26px; height: 26px; border-radius: 50%;
	background: var(--c, var(--accent)); color: #fff;
	font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums;
	box-shadow: 0 0 0 3px rgba(255,255,255,.9);
}
.w-rankrow-cat { display: block; font-size: 10.5px; font-weight: 900; color: var(--c, var(--accent)); margin-bottom: 3px; }
.w-rankrow-title {
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 13.5px; font-weight: 800; line-height: 1.5; font-feature-settings: "palt" 1;
}
.w-rankrow-item:hover .w-rankrow-title { color: var(--c, var(--accent)); }

/* ---------- カテゴリのまとまり（ペット／ライフスタイル） ---------- */
.w-groupsec { padding: 26px 0 6px; }
.w-groupsec--pet { background: linear-gradient(180deg, #fff3ee, rgba(255,243,238,0) 260px); }
.w-groupsec--life { background: linear-gradient(180deg, #f4f6f8, rgba(244,246,248,0) 260px); }
.w-group { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 6px; }
.w-group-label { font-size: 21px; font-weight: 900; letter-spacing: .06em; }
.w-group-desc { font-size: 12px; color: var(--sub); }

/* ---------- カテゴリ別の横並び ---------- */
.w-rail { padding: 8px 0 20px; }
.w-rail-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.w-rail-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: 16px; font-weight: 900; }
.w-rail-title a { display: inline-flex; align-items: center; gap: 8px; }
.w-rail-title a::before {
	content: ""; width: 10px; height: 10px; border-radius: 50%; flex: none;
	background: var(--c, var(--accent)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 18%, transparent);
}
.w-rail-title a:hover { color: var(--c, var(--accent)); }
.w-rail-desc { font-size: 11.5px; font-weight: 500; color: var(--sub); }
.w-rail-more {
	flex: none; font-size: 11.5px; font-weight: 800; color: var(--sub);
	padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.w-rail-more:hover { color: #fff; background: var(--c, var(--accent)); border-color: var(--c, var(--accent)); }
/* 横スクロール。指では流して、マウスでは JS が付ける矢印で送る。 */
.w-rail-scroll {
	overflow-x: auto; scrollbar-width: none;
	scroll-snap-type: x proximity; scroll-behavior: smooth;
	margin: 0 -20px; padding: 0 20px 4px;
}
.w-rail-scroll::-webkit-scrollbar { display: none; }
.w-rail-list { display: flex; gap: 16px; }
.w-rail-list > li { flex: none; scroll-snap-align: start; }
.w-rc { display: block; width: 216px; }
.w-rc-thumb {
	display: block; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 18px;
	background: var(--line); margin-bottom: 10px; position: relative;
}
.w-rc-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.w-rc-thumb::after {
	content: ""; position: absolute; right: 10px; top: 10px; z-index: 2;
	width: 12px; height: 12px; border-radius: 50%;
	background: var(--c, var(--accent)); box-shadow: 0 0 0 3px rgba(255,255,255,.9);
}
.w-rc:hover .w-rc-thumb img { transform: scale(1.05); }
.w-rc-title {
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 13.5px; font-weight: 800; line-height: 1.55; margin-bottom: 5px; font-feature-settings: "palt" 1;
}
.w-rc:hover .w-rc-title { color: var(--c, var(--accent)); }
.w-rc-date { display: block; font-size: 11px; color: var(--sub); font-variant-numeric: tabular-nums; }
/* JS が付ける送りボタン（付かなくても指でスクロールできる） */
.w-rail-wrap { position: relative; }
.w-rail-arrow {
	position: absolute; top: calc(108px - 18px); z-index: 3;
	width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
	background: rgba(255,255,255,.94); color: var(--ink); cursor: pointer;
	display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 900;
	box-shadow: 0 4px 14px rgba(58,43,43,.14);
}
.w-rail-arrow--prev { left: -8px; }
.w-rail-arrow--next { right: -8px; }
.w-rail-arrow:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.w-rail-arrow[hidden] { display: none; }

/* ---------- 記事下「あわせて読みたい」 ---------- */
.w-next { margin-top: 46px; }
.w-next-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 16px; }
.w-next-item { display: block; }
.w-next-thumb {
	display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 16px;
	background: var(--line); margin-bottom: 9px;
}
.w-next-thumb img { width: 100%; height: 100%; object-fit: cover; }
.w-next-item:hover .w-next-thumb img { transform: scale(1.05); }
.w-next-cat { display: block; font-size: 10.5px; font-weight: 900; color: var(--c, var(--accent)); margin-bottom: 3px; }
.w-next-title {
	display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
	font-size: 14px; font-weight: 800; line-height: 1.55; font-feature-settings: "palt" 1;
}
.w-next-item:hover .w-next-title { color: var(--c, var(--accent)); }
.w-next-date { display: block; margin-top: 5px; font-size: 11px; color: var(--sub); font-variant-numeric: tabular-nums; }

/* ---------- 一覧の見出し（カテゴリ色を敷く） ---------- */
.w-arc-head { padding-top: 6px; }
.w-arc-lead { margin: 0 0 6px; font-size: 11px; font-weight: 900; letter-spacing: .14em; color: var(--c, var(--accent)); }
.w-arc-head h1 { display: flex; align-items: center; gap: 10px; }
.w-arc-head h1::before {
	content: ""; width: 14px; height: 14px; border-radius: 50%; flex: none;
	background: var(--c, var(--accent)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--accent)) 18%, transparent);
}
.w-arc-desc { color: var(--sub); font-size: 14px; margin: 0; }

/* ---------- 人気の印 ---------- */
.c-hot {
	display: inline-block; color: #fff; font-size: 10px; font-weight: 900; padding: 3px 9px;
	border-radius: 18px; background: linear-gradient(90deg, var(--accent), #d98a2b);
}

/* ---------- 目次（JSが本文の先頭に入れる） ---------- */
.c-toc {
	background: var(--card); border: 1px solid var(--line); border-radius: 16px;
	padding: 14px 18px 16px; margin: 0 0 1.8em;
}
.c-toc-title { margin: 0 0 8px; font-size: 11px; font-weight: 900; letter-spacing: .16em; color: var(--sub); }
.c-toc ol { counter-reset: toc; }
/* 本文内の ol は decimal を出しているので、目次では消す
   （消さないと数字が二重に並ぶ）。番号は counter で自分で描く。 */
.c-toc ol li { list-style: none; margin-left: 0; margin-bottom: 0; }
.c-toc li { counter-increment: toc; font-size: 14px; line-height: 1.7; }
.c-toc li + li { margin-top: 5px; }
.c-toc li::before { content: counter(toc) "."; margin-right: 8px; font-weight: 900; color: var(--accent); }
/* 本文のリンク色（アクセント）のままだと目次全体が色で埋まるので、文字は本文色にする。 */
.c-toc a { color: var(--ink); text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px; }
.c-toc a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ---------- 読み進み具合（記事ページの最上部） ---------- */
.w-progress {
	position: fixed; left: 0; top: 0; z-index: 60; height: 3px; width: 0;
	background: linear-gradient(90deg, var(--accent), #d98a2b);
	transition: width .1s linear; pointer-events: none;
}

/* ---------- 画面が狭いときの並べ替え ---------- */
@media (max-width: 900px) {
	.w-hero-inner { grid-template-columns: 1fr; gap: 18px; }
	.w-hero-subs { grid-template-columns: 1fr 1fr; }
	.w-rankrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.w-next-list { grid-template-columns: 1fr 1fr; }
	.w-rail-arrow { display: none; }
}
@media (max-width: 640px) {
	.w-hero { padding: 14px 0 2px; }
	.w-hero-lead-thumb { border-radius: 16px; margin-bottom: 11px; }
	.w-hero-subs { grid-template-columns: 1fr; gap: 10px; }
	.w-hero-sub { grid-template-columns: 92px minmax(0, 1fr); gap: 11px; }
	.w-hero-sub-thumb { border-radius: 12px; }
	.w-hero-sub-title { font-size: 13.5px; -webkit-line-clamp: 2; }
	.w-rankrow-sec { padding: 22px 0 2px; }
	/* 順位は横に流す。縦に積むと5件で画面1つぶんを使ってしまう。 */
	.w-rankrow {
		display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none;
		scroll-snap-type: x proximity; margin: 0 -14px; padding: 0 14px 4px;
	}
	.w-rankrow::-webkit-scrollbar { display: none; }
	.w-rankrow > li { flex: none; width: 60%; max-width: 220px; scroll-snap-align: start; }
	.w-group-label { font-size: 18px; }
	.w-groupsec { padding: 20px 0 4px; }
	.w-rail { padding: 6px 0 16px; }
	.w-rail-scroll { margin: 0 -14px; padding: 0 14px 4px; }
	.w-rc { width: 160px; }
	.w-rc-thumb { border-radius: 14px; margin-bottom: 8px; }
	.w-rc-title { font-size: 13px; -webkit-line-clamp: 2; }
	.w-next-list { grid-template-columns: 1fr 1fr; gap: 14px 12px; }
	.w-next-title { font-size: 13px; -webkit-line-clamp: 2; }
	.w-sec-note { font-size: 10px; }
}
