/* playpapa — namespaced under .pd-scope, mobile-first */

.pd-scope {
	--pd-primary: #2563eb;
	--pd-primary-dark: #1d4ed8;
	--pd-bg: #f8fafc;
	--pd-card-bg: #ffffff;
	--pd-text: #1e293b;
	--pd-text-muted: #64748b;
	--pd-border: #e2e8f0;
	--pd-radius: 14px;
	color: var(--pd-text);
	background: var(--pd-bg);
	font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
	line-height: 1.6;
	padding: 1.25rem 1rem 3rem;
	box-sizing: border-box;
}

.pd-scope * {
	box-sizing: border-box;
}

.pd-scope a {
	color: inherit;
	text-decoration: none;
}

/* Hero / search / filters */

.pd-hero {
	max-width: 640px;
	margin: 0 auto 1.75rem;
	text-align: center;
}

.pd-hero-title {
	font-size: 1.9rem;
	font-weight: 800;
	margin: 0 0 .4rem;
}

.pd-hero-subtitle {
	color: var(--pd-text-muted);
	margin: 0 0 1.25rem;
	font-size: .95rem;
}

.pd-search-wrap {
	margin-bottom: .9rem;
}

.pd-search-input {
	width: 100%;
	padding: .75rem 1rem;
	border-radius: 999px;
	border: 1px solid var(--pd-border);
	font-size: 1rem;
	background: var(--pd-card-bg);
}

.pd-search-input:focus {
	outline: 2px solid var(--pd-primary);
	outline-offset: 1px;
}

.pd-age-filters {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	justify-content: center;
}

.pd-filter-btn {
	border: 1px solid var(--pd-border);
	background: var(--pd-card-bg);
	color: var(--pd-text);
	padding: .45rem 1rem;
	border-radius: 999px;
	font-size: .9rem;
	cursor: pointer;
}

.pd-filter-btn.is-active {
	background: var(--pd-primary);
	border-color: var(--pd-primary);
	color: #fff;
}

/* Section titles */

.pd-section-title {
	font-size: 1.25rem;
	font-weight: 700;
	max-width: 960px;
	margin: 0 auto 1rem;
}

.pd-grid-section,
.pd-about {
	max-width: 960px;
	margin: 0 auto 2.5rem;
}

/* Card grid */

.pd-card-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: .9rem;
}

@media (min-width: 560px) {
	.pd-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 860px) {
	.pd-card-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.pd-card {
	display: block;
	background: var(--pd-card-bg);
	border: 1px solid var(--pd-border);
	border-radius: var(--pd-radius);
	overflow: hidden;
	transition: transform .15s ease, box-shadow .15s ease;
}

.pd-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

/* Higher specificity than `.pd-card { display: block }` so the JS filter's
   [hidden] attribute actually hides cards instead of losing the cascade. */
.pd-card[hidden] {
	display: none;
}

.pd-card-thumb img {
	width: 100%;
	display: block;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.pd-card-body {
	padding: .9rem 1rem 1.1rem;
}

.pd-card-type {
	display: block;
	font-size: .68rem;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--pd-text-muted);
	text-transform: uppercase;
	margin-bottom: .3rem;
}

.pd-card-title {
	font-size: 1.05rem;
	margin: 0 0 .4rem;
}

.pd-card-age,
.pd-card-original {
	display: inline-block;
	font-size: .78rem;
	color: var(--pd-text-muted);
	margin-right: .5rem;
}

.pd-card-age {
	color: var(--pd-primary-dark);
	font-weight: 600;
}

.pd-card-tags {
	margin-top: .5rem;
	display: flex;
	flex-wrap: wrap;
	gap: .35rem;
}

.pd-tag {
	font-size: .72rem;
	background: #eef2ff;
	color: var(--pd-primary-dark);
	padding: .2rem .55rem;
	border-radius: 999px;
}

.pd-tag-game {
	background: #fdf2f8;
	color: #be185d;
	font-weight: 600;
}

.pd-empty-state {
	text-align: center;
	color: var(--pd-text-muted);
	padding: 2rem 0;
}

/* About + submission form */

.pd-about p {
	color: var(--pd-text-muted);
}

.pd-submit-form-wrap {
	margin-top: 1.5rem;
	background: var(--pd-card-bg);
	border: 1px solid var(--pd-border);
	border-radius: var(--pd-radius);
	padding: 1.25rem;
}

.pd-submit-success {
	color: #16a34a;
	font-weight: 600;
}

.pd-submit-form {
	display: flex;
	flex-direction: column;
	gap: .5rem;
}

.pd-submit-form input,
.pd-submit-form textarea {
	width: 100%;
	padding: .6rem .8rem;
	border-radius: 8px;
	border: 1px solid var(--pd-border);
	font-family: inherit;
	font-size: .95rem;
}

.pd-btn {
	display: inline-block;
	border: none;
	border-radius: 999px;
	padding: .7rem 1.4rem;
	font-size: .95rem;
	font-weight: 600;
	color: var(--pd-text);
	cursor: pointer;
}

.pd-btn-primary {
	background: var(--pd-primary);
	color: #fff;
	align-self: flex-start;
}

.pd-btn-primary:hover {
	background: var(--pd-primary-dark);
}

/* Single game page */

.pd-single {
	max-width: 720px;
	margin: 0 auto;
}

.pd-single-title {
	font-size: 1.6rem;
	font-weight: 800;
	margin: 0 0 .75rem;
}

.pd-info-card {
	background: var(--pd-card-bg);
	border: 1px solid var(--pd-border);
	border-radius: var(--pd-radius);
	padding: 1rem 1.1rem;
	margin-bottom: 1.25rem;
}

.pd-info-badge {
	display: inline-block;
	font-size: .82rem;
	color: var(--pd-text-muted);
	margin-right: .6rem;
	margin-bottom: .3rem;
}

.pd-info-badge-primary {
	color: var(--pd-primary-dark);
	font-weight: 700;
}

.pd-info-badge-type {
	display: block;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	margin-bottom: .5rem;
}

.pd-pain-point {
	margin: .6rem 0 0;
	font-size: .92rem;
	color: var(--pd-text-muted);
}

.pd-rule-block {
	background: var(--pd-card-bg);
	border: 1px solid var(--pd-border);
	border-radius: var(--pd-radius);
	padding: 1rem 1.1rem;
	margin-bottom: .9rem;
}

.pd-rule-block h2 {
	font-size: 1.05rem;
	margin: 0 0 .6rem;
}

.pd-setup-list,
.pd-house-rule-steps {
	margin: 0;
	padding-left: 1.2rem;
}

.pd-setup-list li,
.pd-house-rule-steps li {
	margin-bottom: .35rem;
}

.pd-rule-placeholder {
	color: var(--pd-text-muted);
	margin: 0;
}

.pd-parent-tip {
	background: #fffbeb;
	border-color: #fde68a;
}

.pd-comments-wrap {
	margin-top: 2rem;
}

.pd-back-link {
	margin-top: 2rem;
	font-size: .9rem;
	color: var(--pd-primary-dark);
}

/* Hero card (single post) */

.pd-hero-image {
	border-radius: var(--pd-radius);
	overflow: hidden;
	margin-bottom: 1rem;
}

.pd-hero-image img {
	width: 100%;
	display: block;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.pd-hero-summary {
	margin: 0 0 .6rem;
	font-size: .95rem;
	color: var(--pd-text);
}

/* Blog cadence: published date on cards */

.pd-card-date {
	display: block;
	margin-top: .5rem;
	font-size: .74rem;
	color: var(--pd-text-muted);
}

/* Related posts (single post) */

.pd-related-posts {
	margin-top: 2rem;
}

/* Free-form blog body (single post) — rendered from the_content(), so this
   has to cover whatever the block editor outputs: paragraphs, headings,
   lists, images, and embeds (YouTube oEmbed wraps in .wp-embed-responsive /
   a bare <iframe> depending on theme support, so both are covered here). */

.pd-blog-body {
	margin-top: 1.5rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--pd-border);
	line-height: 1.7;
}

.pd-blog-body h2,
.pd-blog-body h3,
.pd-blog-body h4 {
	margin: 1.4rem 0 .6rem;
}

.pd-blog-body p {
	margin: 0 0 1rem;
}

.pd-blog-body img {
	max-width: 100%;
	height: auto;
	border-radius: var(--pd-radius);
	display: block;
	margin: 1rem 0;
}

.pd-blog-body iframe,
.pd-blog-body video {
	max-width: 100%;
}

.pd-blog-body .wp-block-embed__wrapper,
.pd-blog-body .wp-embed-responsive .wp-block-embed__wrapper {
	position: relative;
	padding-top: 56.25%; /* 16:9 */
	height: 0;
	overflow: hidden;
	margin: 1rem 0;
	border-radius: var(--pd-radius);
}

.pd-blog-body .wp-block-embed__wrapper iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
