/* Poker Hack UX 1.4 — readable list, intact pages, responsive. */

:root {
	--ph-bg: #ffffff;
	--ph-fill: #eef4f0;
	--ph-text: #1d1d1f;
	--ph-secondary: #3a3f3d;
	--ph-tertiary: #5f6864;
	--ph-line: #d4ddd8;
	--ph-link: #0b6b4f;
	--ph-focus: #0b6b4f;
	--ph-accent: #0b6b4f;
	--ph-accent-soft: #e4f2eb;
	--ph-page: 72rem;
	--ph-font: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans Japanese", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--ph-tap: 2.75rem;
	--ph-thumb: 10.5rem;
}

html {
	background: var(--ph-bg);
}

body {
	background: var(--ph-bg) !important;
	color: var(--ph-text);
	font-family: var(--ph-font);
	font-size: 1.0625rem;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

a {
	color: var(--ph-link);
	text-underline-offset: 0.15em;
}

:focus-visible {
	outline: 2px solid var(--ph-focus);
	outline-offset: 2px;
}

.ph-skip {
	position: absolute;
	left: 0.75rem;
	top: -3rem;
	z-index: 1000;
	padding: 0.5rem 0.75rem;
	background: var(--ph-text);
	color: #fff;
	text-decoration: none;
}

.ph-skip:focus {
	top: 0.75rem;
	color: #fff;
}

.animate {
	animation: none !important;
	opacity: 1 !important;
	transform: none !important;
}

#page-top {
	display: none;
}

/* Header image is decorative; hide visually. Do not strip HTML. */
#main-image {
	display: none !important;
}

/* Home index: topic boards. Hide the chronological card river. */
body.home,
body.blog {
	background: var(--ph-fill) !important;
}

body.home #home-top-widget,
body.home .toppost-list-box-simple,
body.home .post-list-mag,
body.home #main-contents > .pagination,
body.home #main-contents .pagination,
body.home #main-contents .pager {
	display: none !important;
}

.ph-home {
	margin: 0 0 1.5rem;
}

.ph-home-lead {
	margin: 0 0 1.35rem;
	color: var(--ph-secondary);
	font-size: 0.9375rem;
}

.ph-boards {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.35rem 1.5rem;
}

.ph-board {
	background: var(--ph-bg);
	padding: 0.95rem 1.1rem 0.4rem;
	border: 1px solid var(--ph-line);
	border-top: 3px solid var(--ph-accent);
	border-radius: 10px;
}

.ph-board-title {
	margin: 0 0 0.35rem;
	padding: 0 0 0.5rem;
	border-bottom: 1px solid var(--ph-line);
	color: var(--ph-accent);
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ph-board-title a {
	color: var(--ph-accent);
	text-decoration: none;
}

.ph-board-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ph-board-list li + li a {
	border-top: 1px solid var(--ph-line);
}

.ph-board-list a {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.75rem 0;
	color: inherit;
	text-decoration: none;
}

.ph-item-title {
	color: #16382c;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
}

.ph-board-list a:hover {
	background: var(--ph-accent-soft);
	margin: 0 -0.55rem;
	padding-left: 0.55rem;
	padding-right: 0.55rem;
	border-radius: 6px;
}

.ph-board-list a:hover .ph-item-title {
	color: var(--ph-accent);
}

.ph-item-desc {
	color: var(--ph-tertiary);
	font-size: 0.8125rem;
	font-weight: 400;
	line-height: 1.45;
}

/* Dates stay hidden — site owner hid them on purpose. */
.cps-post-date-box,
.cps-post-date,
span.cps-post-date,
.entry-date,
.post-list-meta time {
	display: none !important;
}

/* ——— Header ——— */

#nav-container,
#nav-container.header-style8-animate,
.header-style6-box,
#drawernav5 {
	position: sticky;
	top: 0;
	z-index: 200;
	height: auto;
	min-height: var(--ph-tap);
	background: var(--ph-bg);
	border-bottom: 2px solid var(--ph-accent);
	box-shadow: none;
}

#drawernav5 nav.fixed-content {
	position: relative;
	background: transparent;
	box-shadow: none;
}

#drawernav5 .menu-box {
	display: flex;
	align-items: center;
	max-width: var(--ph-page);
	margin: 0 auto;
	padding: 0 1rem;
	list-style: none;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
}

#drawernav5 .menu-box::-webkit-scrollbar {
	display: none;
}

#drawernav5 .menu-box > li {
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

#drawernav5 .menu-box > li > a {
	display: flex;
	align-items: center;
	min-height: var(--ph-tap);
	padding: 0 0.7rem;
	color: var(--ph-secondary);
	font-size: 0.9375rem;
	font-weight: 400;
	text-decoration: none;
	white-space: nowrap;
	background: none;
}

#drawernav5 .menu-box > li.menu-item-home > a,
#drawernav5 .menu-box > li.current_page_item > a {
	padding-left: 0;
	color: var(--ph-accent);
	font-size: 0.9375rem;
	font-weight: 600;
}

#drawernav5 .menu-box .fa-house,
#drawernav5 .menu-box i {
	display: none !important;
}

/* ——— Page layout ——— */

#contents {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 17rem;
	gap: 2.5rem;
	max-width: var(--ph-page);
	margin: 0 auto;
	padding: 1.5rem 1.25rem 3rem;
}

#main-contents,
#main-contents.main-contents {
	float: none !important;
	width: auto !important;
	max-width: none;
	padding: 0;
	background: transparent;
	box-shadow: none;
}

#sidebar,
#sidebar.sideber {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 0;
	background: transparent;
	position: static !important;
}

/* Calculator is already in the global nav. Do not leave a stray widget. */
#home-top-widget {
	display: none !important;
}

/* ——— Article list: 2 columns, thumbnail on top ——— */

.toppost-list-box-simple {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
}

.home .post-list-mag,
.blog .post-list-mag,
.archive .post-list-mag,
.search .post-list-mag {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: 1.75rem 1.5rem;
	width: 100% !important;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
}

.home .post-list-item,
.blog .post-list-item,
.archive .post-list-item,
.search .post-list-item {
	position: relative;
	float: none !important;
	width: auto !important;
	max-width: none !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	overflow: visible;
}

.home .post-list-link,
.blog .post-list-link,
.archive .post-list-link,
.search .post-list-link {
	display: flex !important;
	flex-direction: column;
	height: 100%;
	padding: 0;
	color: inherit;
	text-decoration: none;
	background: none;
}

.home .post-list-inner,
.blog .post-list-inner,
.archive .post-list-inner,
.search .post-list-inner {
	display: flex !important;
	flex-direction: column;
	height: 100%;
}

.home .post-list-thumb,
.blog .post-list-thumb,
.archive .post-list-thumb,
.search .post-list-thumb {
	display: block !important;
	position: relative !important;
	top: auto !important;
	left: auto !important;
	float: none !important;
	width: 100% !important;
	height: 0 !important;
	padding: 0 0 56.25% !important;
	margin: 0 !important;
	overflow: hidden;
	background: var(--ph-fill);
}

.home .post-list-thumb img,
.blog .post-list-thumb img,
.archive .post-list-thumb img,
.search .post-list-thumb img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
}

.home .post-list-meta,
.blog .post-list-meta,
.archive .post-list-meta,
.search .post-list-meta {
	position: static !important;
	top: auto !important;
	left: auto !important;
	right: auto !important;
	bottom: auto !important;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0.8rem 0 0 !important;
	background: none !important;
}

.post-list-cat,
span.post-list-cat {
	position: static !important;
	top: auto !important;
	left: auto !important;
	display: inline-block;
	margin: 0 0 0.35rem !important;
	padding: 0 !important;
	background: none !important;
	background-color: transparent !important;
	color: var(--ph-accent) !important;
	font-size: 0.75rem !important;
	font-weight: 400 !important;
	line-height: 1.4;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
}

h2.post-list-title,
.post-list-title.entry-title {
	position: static !important;
	margin: 0 !important;
	padding: 0 !important;
	color: var(--ph-text);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.4;
}

.home .post-list-link:hover .post-list-title,
.blog .post-list-link:hover .post-list-title {
	color: var(--ph-link);
}

.home .writer,
.blog .writer,
.archive .writer,
.search .writer,
.post-list-publisher {
	display: none;
}

.pagination,
.page-numbers,
.pager {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin-top: 1.75rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ph-line);
}

.pagination a,
.page-numbers a,
.pagination span,
.page-numbers span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--ph-tap);
	min-height: var(--ph-tap);
	color: var(--ph-secondary);
	text-decoration: none;
	background: none;
	border: 0;
}

.pagination .current,
.page-numbers.current {
	color: var(--ph-text);
	font-weight: 600;
}

/* ——— Article / page body ——— */

.cps-post-box,
.cps-post,
.cps-post-main-box,
.cps-post-main {
	background: none;
	box-shadow: none;
	border: 0;
	margin: 0;
	padding: 0;
}

.cps-post-header {
	margin: 0 0 1.25rem;
	padding: 0;
	background: none;
	border: 0;
}

.cps-post-cat,
.cps-post-cat a {
	display: inline-block;
	margin: 0 0 0.45rem;
	padding: 0 !important;
	background: none !important;
	color: var(--ph-accent) !important;
	font-size: 0.75rem;
	text-decoration: none;
}

h1.cps-post-title,
h1.entry-title {
	margin: 0 0 0.75rem;
	padding: 0;
	color: var(--ph-text);
	font-size: clamp(1.5rem, 2.2vw, 2rem);
	font-weight: 600;
	line-height: 1.3;
}

.cps-post-thumb {
	display: block;
	margin: 0 0 1.5rem;
}

.cps-post-thumb img {
	display: block;
	width: 100%;
	height: auto;
}

.share-top {
	margin: 0 0 1.5rem;
}

.entry-content,
.cps-post-main.entry-content {
	max-width: 42rem;
	color: var(--ph-text);
	font-size: 1.0625rem;
	line-height: 1.8;
}

.entry-content h2,
.cps-post-main h2 {
	margin: 2rem 0 0.7rem;
	padding: 0;
	color: var(--ph-text);
	font-size: 1.25rem;
	font-weight: 600;
	line-height: 1.4;
	background: none;
	border: 0;
	box-shadow: none;
}

.entry-content h3,
.cps-post-main h3 {
	margin: 1.5rem 0 0.5rem;
	padding: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	background: none;
	border: 0;
}

.entry-content p {
	margin: 0 0 1.1em;
}

.entry-content img {
	height: auto;
	max-width: 100%;
}

.entry-content table {
	width: 100%;
	margin: 0 0 1.5em;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

.entry-content th,
.entry-content td {
	padding: 0.55rem 0.45rem;
	border-bottom: 1px solid var(--ph-line);
	text-align: left;
	vertical-align: top;
}

#prev-next {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--ph-line);
	background: none;
}

.related-entry-section {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--ph-line);
}

.related-entry-headline,
.related-entry-headline-text {
	margin: 0 0 0.75rem;
	padding: 0;
	color: var(--ph-text);
	font-size: 0.9375rem;
	font-weight: 600;
	background: none;
	border: 0;
}

.related-entry-section .swiper-slide-duplicate {
	display: none !important;
}

.related-entry-section .swiper-wrapper {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
	gap: 1rem;
	transform: none !important;
	height: auto !important;
}

.related-entry-section .swiper-slide {
	width: auto !important;
	margin: 0 !important;
	height: auto !important;
}

.related-entry-section .post-list-thumb {
	position: relative !important;
	height: 5.5rem;
	overflow: hidden;
}

.related-entry-section .post-list-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.related-entry-section .post-list-cat {
	position: static !important;
}

/* ——— Sidebar ——— */

#sidebar .widget {
	margin: 0 0 1.5rem;
	padding: 0;
	background: none;
	border: 0;
	box-shadow: none;
}

#sidebar .widgettitle,
#sidebar .wp-block-heading {
	margin: 0 0 0.5rem;
	padding: 0 0 0.4rem;
	color: var(--ph-accent);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	background: none;
	border: 0;
	border-bottom: 2px solid var(--ph-accent);
}

.wp-block-search__label {
	display: block;
	margin: 0 0 0.35rem;
	color: var(--ph-text);
	font-size: 0.75rem;
	font-weight: 600;
}

.wp-block-search__inside-wrapper {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}

.wp-block-search__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: var(--ph-tap);
	padding: 0 0.65rem !important;
	border: 1px solid var(--ph-line) !important;
	background: var(--ph-bg) !important;
	color: var(--ph-text);
	font-size: 1rem;
	box-shadow: none !important;
}

.wp-block-search__button {
	min-height: var(--ph-tap);
	padding: 0 0.9rem !important;
	background: var(--ph-accent-soft) !important;
	color: var(--ph-accent) !important;
	border: 1px solid var(--ph-accent) !important;
	border-radius: 6px !important;
	box-shadow: none !important;
	font-size: 0.875rem;
	font-weight: 700;
}

.wp-block-search__button:hover,
.wp-block-search__button:focus {
	background: var(--ph-accent) !important;
	color: #fff !important;
}

#sidebar .wp-block-categories,
#sidebar .wp-block-categories-list {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	list-style: none;
}

#sidebar .cat-item {
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--ph-line);
	background: none;
}

#sidebar .cat-item a {
	display: flex;
	align-items: center;
	min-height: 2.5rem;
	padding: 0;
	color: var(--ph-text);
	text-decoration: none;
	font-size: 0.9375rem;
}

#sidebar .cat-item-18 { order: 1; }
#sidebar .cat-item-1 { order: 2; }
#sidebar .cat-item-22 { order: 3; }
#sidebar .cat-item-23 { order: 4; }
#sidebar .cat-item-31 { order: 5; }
#sidebar .cat-item-6 { order: 6; }
#sidebar .cat-item-16 { order: 7; }
#sidebar .cat-item-19 { order: 8; }
#sidebar .cat-item-36 { order: 9; }
#sidebar .cat-item-37 { order: 10; }
#sidebar .cat-item-32 { order: 11; }
#sidebar .cat-item-29 { order: 12; }
#sidebar .cat-item-38 { order: 13; }
#sidebar .cat-item-39 { order: 14; }

#listcategorypostswidget-2:has(ul:empty) {
	display: none;
}

/* ——— Footer ——— */

footer {
	background: var(--ph-fill) !important;
	color: var(--ph-secondary);
}

#footer-widget-area {
	max-width: var(--ph-page);
	margin: 0 auto;
	padding: 1.25rem 1.25rem 0;
	background: transparent !important;
}

.footer-inner {
	display: none;
}

.ph-footer-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.25rem;
	max-width: var(--ph-page);
	margin: 0 auto;
	padding: 1rem 1.25rem 2rem;
	border-top: 1px solid var(--ph-line);
	font-size: 0.875rem;
}

.ph-footer-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 2.5rem;
	color: var(--ph-secondary);
	text-decoration: none;
}

.ph-footer-nav a:hover {
	color: var(--ph-text);
	text-decoration: underline;
}

.wp-social-link {
	background: none !important;
}

@media (max-width: 880px) {
	#contents {
		display: block;
		padding: 1.15rem 1rem 2.5rem;
	}

	#sidebar,
	#sidebar.sideber {
		width: auto !important;
		margin-top: 2rem !important;
		padding-top: 1.25rem;
		border-top: 1px solid var(--ph-line);
	}

	h1.cps-post-title {
		font-size: 1.45rem;
	}

	.ph-boards {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
}

@media (max-width: 720px) {
	.home .post-list-mag,
	.blog .post-list-mag,
	.archive .post-list-mag,
	.search .post-list-mag {
		grid-template-columns: 1fr;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}
}
