/*
Theme Name:   Masal Oku Child
Theme URI:    https://www.masaloku.org
Description:  Masal Oku için GeneratePress alt teması. Neşeli kitap rafı tasarımı, kategori renkleri, sayfa başına en fazla 3 reklam.
Author:       Masal Oku
Template:     generatepress
Version:      1.0.0
Text Domain:  masaloku-child
*/

/* ==========================================================
   1. Renkler ve yazı tipleri
   Fredoka + Nunito functions.php içinden yüklenir.
   ========================================================== */
html:root {
	--m-ink: #2b2358;
	--m-muted: #5e5690;
	--m-line: #ddd3ff;
	--m-cream: #fffaf0;
	--m-sky: #e4f5ff;
	--m-sky-deep: #bfe6ff;
	--m-yellow: #ffc933;
	--m-yellow-soft: #fff0bf;
	--m-pink: #ff62ab;
	--m-purple: #7a4dff;
	--m-head: "Fredoka", "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
	--m-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--m-wide: 1140px;
	--m-read: 720px;
}

/* Kategori renkleri: her kategori bir kitap.
   --c fill, --on fill üstündeki yazı, --ct açık zemin üstündeki yazı rengi. */
.masal-c1 { --c: #7a4dff; --on: #ffffff; --ct: #5b2fe0; }
.masal-c2 { --c: #2ea6ff; --on: #2b2358; --ct: #0a68b8; }
.masal-c3 { --c: #34c776; --on: #2b2358; --ct: #16794a; }
.masal-c4 { --c: #ff7f3f; --on: #2b2358; --ct: #b94108; }
.masal-c5 { --c: #ff62ab; --on: #2b2358; --ct: #b8236f; }
.masal-c6 { --c: #ffc933; --on: #2b2358; --ct: #7d5800; }
.masal-c7 { --c: #22cfc6; --on: #2b2358; --ct: #0a736f; }
.masal-c8 { --c: #d63048; --on: #ffffff; --ct: #b81f35; }
.masal-c0 { --c: #2b2358; --on: #ffffff; --ct: #2b2358; }

/* ==========================================================
   2. Temel
   ========================================================== */
html body.masal-theme {
	background-color: var(--m-cream);
	background-image: radial-gradient(rgba(122, 77, 255, 0.07) 2px, transparent 2px);
	background-size: 28px 28px;
	color: var(--m-ink);
	font-family: var(--m-body);
}
.site-content.masal-content { display: block; }
.masal-main {
	display: block;
	width: 100%;
	font-family: var(--m-body);
	color: var(--m-ink);
}
.masal-wrap {
	width: 100%;
	max-width: var(--m-wide);
	margin-inline: auto;
	padding-inline: 20px;
	box-sizing: border-box;
}
.masal-main a { color: inherit; text-decoration: none; }
.masal-main img { max-width: 100%; height: auto; }
.masal-main a:focus-visible,
.masal-main button:focus-visible,
.masal-header a:focus-visible,
.masal-header button:focus-visible,
.masal-footer a:focus-visible {
	outline: 3px solid var(--m-purple);
	outline-offset: 3px;
	border-radius: 8px;
}
.masal-footer a:focus-visible { outline-color: var(--m-yellow); }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
.skip-link.screen-reader-text:focus {
	position: fixed !important;
	top: 8px; left: 8px;
	z-index: 1000;
	width: auto; height: auto;
	margin: 0;
	padding: 10px 16px;
	clip: auto;
	background: #fff;
	color: var(--m-ink);
	font-weight: 800;
	border-radius: 12px;
	outline: 3px solid var(--m-purple);
}

/* ==========================================================
   3. Üst bilgi
   ========================================================== */
.masal-header {
	position: relative;
	z-index: 20;
	background: #fff;
	border-bottom: 3px solid var(--m-ink);
	font-family: var(--m-body);
}
.masal-header::before {
	content: "";
	display: block;
	height: 8px;
	background: linear-gradient(90deg, #7a4dff 0 16.6%, #2ea6ff 0 33.3%, #34c776 0 50%, #ffc933 0 66.6%, #ff7f3f 0 83.3%, #ff62ab 0);
}
.masal-header-inner {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 76px;
}
.masal-brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	flex: none;
	color: var(--m-ink);
	text-decoration: none;
}
.masal-brand-name {
	font-family: var(--m-head);
	font-weight: 700;
	font-size: 1.65rem;
	line-height: 1.1;
	letter-spacing: 0.005em;
	color: inherit;
}
.masal-brand-logo img { display: block; max-height: 52px; width: auto; }
/* üç renkli kitap */
.masal-mark {
	display: inline-flex;
	align-items: flex-end;
	gap: 3px;
	height: 36px;
	padding-bottom: 4px;
	border-bottom: 4px solid var(--m-ink);
	border-radius: 0 0 3px 3px;
}
.masal-mark i {
	display: block;
	width: 10px;
	border: 2px solid var(--m-ink);
	border-bottom: 0;
	border-radius: 5px 5px 0 0;
	box-sizing: border-box;
}
.masal-mark i:nth-child(1) { height: 27px; background: #7a4dff; }
.masal-mark i:nth-child(2) { height: 21px; background: #ff62ab; }
.masal-mark i:nth-child(3) { height: 25px; background: #ffc933; transform: rotate(10deg); transform-origin: bottom left; margin-right: 5px; }

.masal-panel {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex: 1 1 auto;
	min-width: 0;
}
.masal-nav { flex: 1 1 auto; min-width: 0; }
.masal-nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 2px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.masal-nav-list li { margin: 0; padding: 0; }
.masal-nav-list a {
	display: block;
	padding: 8px 13px;
	border-radius: 999px;
	font-family: var(--m-head);
	font-weight: 500;
	font-size: 1rem;
	white-space: nowrap;
	line-height: 1.2;
	color: var(--m-ink);
	text-decoration: none;
}
.masal-nav-list a:hover { background: var(--m-yellow-soft); color: var(--m-ink); }
.masal-nav-list .current-menu-item > a,
.masal-nav-list .current-menu-parent > a,
.masal-nav-list .current-post-ancestor > a {
	background: var(--m-purple);
	color: #fff;
}
.masal-search {
	display: flex;
	align-items: center;
	flex: 0 0 190px;
	width: 190px;
	margin: 0;
	border: 3px solid var(--m-ink);
	border-radius: 999px;
	background: #fff;
}
.masal-search:focus-within { border-color: var(--m-purple); }
.masal-header .masal-search input[type="search"] {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	height: 38px;
	padding: 0 4px 0 16px;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	font: inherit;
	font-size: 0.98rem;
	color: var(--m-ink);
	outline: none;
}
.masal-header .masal-search button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 36px;
	height: 36px;
	margin: 0 1px 0 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: var(--m-yellow);
	box-shadow: none;
	color: var(--m-ink);
	cursor: pointer;
}
.masal-header .masal-search button:hover { background: #ffb800; color: var(--m-ink); }
.masal-header .masal-menu-toggle {
	display: none;
	align-items: center;
	gap: 9px;
	margin-left: auto;
	padding: 8px 15px;
	border: 3px solid var(--m-ink);
	border-radius: 14px;
	background: var(--m-yellow);
	box-shadow: 0 3px 0 var(--m-ink);
	color: var(--m-ink);
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.2;
	cursor: pointer;
}
.masal-menu-icon,
.masal-menu-icon::before,
.masal-menu-icon::after {
	display: block;
	width: 18px;
	height: 3px;
	border-radius: 2px;
	background: currentColor;
}
.masal-menu-icon { position: relative; }
.masal-menu-icon::before,
.masal-menu-icon::after { content: ""; position: absolute; left: 0; }
.masal-menu-icon::before { top: -6px; }
.masal-menu-icon::after { top: 6px; }

@media (max-width: 1100px) {
	.masal-header-inner { flex-wrap: wrap; gap: 0 14px; min-height: 64px; }
	.masal-brand { flex: 0 1 auto; min-width: 0; max-width: calc(100% - 130px); padding: 10px 0; }
	.masal-brand-name { font-size: 1.4rem; }
	.masal-header .masal-menu-toggle { display: inline-flex; flex: none; }
	.masal-panel {
		display: none;
		flex: 1 0 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 6px 0 18px;
	}
	.masal-header.is-open .masal-panel { display: flex; }
	.masal-nav-list { flex-direction: column; gap: 0; }
	.masal-nav-list a {
		padding: 13px 6px;
		border-radius: 0;
		border-bottom: 2px dashed var(--m-line);
		font-size: 1.1rem;
	}
	.masal-nav-list .current-menu-item > a { padding-left: 14px; border-radius: 12px; border-bottom-color: transparent; }
	.masal-search { flex: none; width: auto; }
	.masal-header .masal-search input[type="search"] { height: 44px; font-size: 1rem; }
	.masal-header .masal-search button { width: 40px; height: 40px; }
}
@media (max-width: 480px) {
	.masal-brand { gap: 9px; }
	.masal-brand-name { font-size: 1.25rem; }
	.masal-mark { height: 30px; }
	.masal-mark i { width: 8px; }
	.masal-mark i:nth-child(1) { height: 22px; }
	.masal-mark i:nth-child(2) { height: 17px; }
	.masal-mark i:nth-child(3) { height: 20px; }
	.masal-header .masal-menu-toggle { padding: 7px 12px; }
}

/* ==========================================================
   4. Alt bilgi
   ========================================================== */
.masal-footer {
	position: relative;
	margin-top: 40px;
	background: var(--m-ink);
	color: #ddd8f5;
	font-family: var(--m-body);
	font-size: 1rem;
	line-height: 1.6;
}
.masal-footer::before {
	content: "";
	position: absolute;
	left: 0; right: 0;
	top: -25px;
	height: 26px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20Q75 0 150 20T300 20V40H0Z' fill='%232b2358'/%3E%3C/svg%3E") repeat-x 0 100% / 300px 26px;
}
.masal-stripe {
	display: flex;
	gap: 5px;
	height: 12px;
	padding-top: 0;
	margin-top: 0;
	position: relative;
	top: 8px;
}
.masal-stripe span { flex: 1 1 0; border-radius: 999px; background: var(--c); }
.masal-stripe span.masal-c1 { background: #9b7bff; }
.masal-footer-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) minmax(0, 0.8fr);
	gap: 48px;
	padding-top: 52px;
	padding-bottom: 40px;
}
.masal-footer .masal-brand { color: #fff; }
.masal-footer .masal-mark { border-bottom-color: #fff; }
.masal-footer-about p { max-width: 36ch; margin: 16px 0 0; }
.masal-footer h2 {
	margin: 4px 0 14px;
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.3rem;
	line-height: 1.2;
	color: #fff;
}
.masal-footer ul { margin: 0; padding: 0; list-style: none; }
.masal-footer li { margin: 0 0 9px; padding: 0; }
.masal-footer a { color: #f0edff; text-decoration: none; }
.masal-footer a:hover { color: var(--m-yellow); text-decoration: underline; text-underline-offset: 3px; }
.masal-footer-cats ul { columns: 2; column-gap: 28px; }
.masal-footer-cats li { break-inside: avoid; }
.masal-footer-cats li a::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-right: 10px;
	border-radius: 50%;
	background: var(--c);
	vertical-align: -1px;
}
.masal-footer-cats li.masal-c1 a::before { background: #9b7bff; }
.masal-footer-bottom {
	padding-top: 18px;
	padding-bottom: 26px;
	border-top: 2px dashed rgba(255, 255, 255, 0.2);
	font-size: 0.9rem;
	color: #b4acd9;
}
.masal-footer-bottom p { margin: 0; }

@media (max-width: 900px) {
	.masal-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px 28px; padding-top: 40px; }
	.masal-footer-about { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
	.masal-footer-grid { grid-template-columns: 1fr; }
	.masal-footer-cats ul { columns: 2; }
}

/* ==========================================================
   5. Ana sayfa: gökyüzü ve kitap rafı
   ========================================================== */
.masal-hero {
	position: relative;
	padding: 48px 0 26px;
	background: linear-gradient(180deg, var(--m-sky-deep) 0%, var(--m-sky) 100%);
	overflow: hidden;
}
.masal-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-repeat: no-repeat;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg stroke='%23ffc933' stroke-width='6' stroke-linecap='round'%3E%3Cpath d='M50 6v12M50 82v12M6 50h12M82 50h12M19 19l8 8M73 73l8 8M81 19l-8 8M27 73l-8 8'/%3E%3C/g%3E%3Ccircle cx='50' cy='50' r='24' fill='%23ffd75e' stroke='%232b2358' stroke-width='4'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='34' cy='38' r='18'/%3E%3Ccircle cx='60' cy='28' r='24'/%3E%3Ccircle cx='88' cy='38' r='18'/%3E%3Crect x='30' y='38' width='62' height='18' rx='9'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 60'%3E%3Cg fill='%23ffffff'%3E%3Ccircle cx='34' cy='38' r='18'/%3E%3Ccircle cx='60' cy='28' r='24'/%3E%3Ccircle cx='88' cy='38' r='18'/%3E%3Crect x='30' y='38' width='62' height='18' rx='9'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 17l-6.1 3.4 1.5-6.8L2.2 9l6.9-.7z' fill='%23ffc933' stroke='%232b2358' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 17l-6.1 3.4 1.5-6.8L2.2 9l6.9-.7z' fill='%23ffc933' stroke='%232b2358' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 17l-6.1 3.4 1.5-6.8L2.2 9l6.9-.7z' fill='%23ff62ab' opacity='.85'/%3E%3C/svg%3E");
	background-position: 96% 16px, 3% 24px, 47% 14px, 41% 62px, 76% 40px, 58% 88px;
	background-size: 86px 86px, 120px 60px, 96px 48px, 26px 26px, 20px 20px, 18px 18px;
}
.masal-hero::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 26px;
	pointer-events: none;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 40' preserveAspectRatio='none'%3E%3Cpath d='M0 20Q75 0 150 20T300 20V40H0Z' fill='%23fffaf0'/%3E%3C/svg%3E") repeat-x 0 100% / 300px 26px;
}
.masal-hero .masal-wrap { position: relative; z-index: 1; }
.masal-hero-inner {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 40px;
}
.masal-hero-text {
	flex: 1 1 340px;
	max-width: 460px;
	padding-bottom: 40px;
}
.masal-hero h1 {
	margin: 0 0 16px;
	font-family: var(--m-head);
	font-weight: 700;
	font-size: clamp(2.5rem, 5.4vw, 4rem);
	line-height: 1.04;
	letter-spacing: 0;
	color: var(--m-ink);
}
.masal-hero h1 span {
	display: inline-block;
	padding-bottom: 0.14em;
	color: var(--m-pink);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 8'%3E%3Cpath d='M0 4Q6 0 12 4T24 4' fill='none' stroke='%23ffc933' stroke-width='3.2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 100% / 24px 8px;
}
.masal-hero p {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.55;
	color: var(--m-muted);
}

.masal-shelf {
	flex: 0 1 auto;
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0;
	padding: 0 6px 0 0;
	list-style: none;
}
.masal-shelf li { margin: 0; padding: 0; transform-origin: 50% 100%; }
.masal-shelf li:nth-child(3n+1) { transform: rotate(-1.6deg); }
.masal-shelf li:nth-child(3n+2) { transform: rotate(1.2deg); }
.masal-shelf li:nth-child(3n)   { transform: rotate(-0.4deg); }
.masal-spine {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	writing-mode: vertical-rl;
	width: 64px;
	height: 250px;
	padding: 34px 0 12px;
	box-sizing: border-box;
	background: var(--c);
	color: var(--on) !important;
	border: 3px solid var(--m-ink);
	border-radius: 18px 18px 6px 6px;
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1;
	white-space: nowrap;
	box-shadow: inset -6px 0 0 rgba(0, 0, 0, 0.1), inset 4px 0 0 rgba(255, 255, 255, 0.25);
	transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1);
}
.masal-spine::before {
	content: "";
	position: absolute;
	left: 8px; right: 8px; top: 12px;
	height: 7px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.6);
}
.masal-spine > span:first-child {
	flex: 1 1 0;
	min-height: 0;
	padding: 0 2px;
	overflow: hidden;
	text-align: center;
	white-space: normal;
	line-height: 1.1;
}
.masal-spine-count {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	writing-mode: horizontal-tb;
	min-width: 28px;
	height: 28px;
	padding: 0 4px;
	box-sizing: border-box;
	border: 2px solid var(--m-ink);
	border-radius: 999px;
	background: #fff;
	color: var(--m-ink);
	font-family: var(--m-body);
	font-size: 0.78rem;
	font-weight: 800;
}
/* raftaki kitaplar aynı boyda olmaz */
.masal-shelf li:nth-child(8n+1) .masal-spine { height: 270px; }
.masal-shelf li:nth-child(8n+2) .masal-spine { height: 238px; width: 58px; }
.masal-shelf li:nth-child(8n+3) .masal-spine { height: 258px; width: 70px; }
.masal-shelf li:nth-child(8n+4) .masal-spine { height: 228px; }
.masal-shelf li:nth-child(8n+5) .masal-spine { height: 264px; width: 60px; }
.masal-shelf li:nth-child(8n+6) .masal-spine { height: 244px; width: 68px; }
.masal-shelf li:nth-child(8n+7) .masal-spine { height: 234px; }
.masal-shelf li:last-child {
	transform: rotate(7deg);
	margin-right: 24px;
}
.masal-spine:hover,
.masal-spine:focus-visible { transform: translateY(-14px); }

.masal-board {
	height: 18px;
	background: #e5a560;
	border: 3px solid var(--m-ink);
	border-radius: 10px;
	box-shadow: inset 0 5px 0 #f3c48b, 0 6px 0 rgba(43, 35, 88, 0.18);
}

/* ==========================================================
   6. Liste başlığı (kategori, etiket, arama)
   ========================================================== */
.masal-band {
	position: relative;
	background-color: var(--c);
	background-image: radial-gradient(rgba(255, 255, 255, 0.28) 2.5px, transparent 2.5px);
	background-size: 24px 24px;
	color: var(--on);
	padding: 44px 0 56px;
	border-bottom: 3px solid var(--m-ink);
}
.masal-band h1 {
	margin: 0;
	font-family: var(--m-head);
	font-weight: 700;
	font-size: clamp(2.2rem, 4.8vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: 0;
	color: inherit;
}
.masal-band-desc {
	max-width: 62ch;
	margin: 14px 0 0;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.6;
}
.masal-band-desc p { margin: 0; }
.masal-band-count {
	display: inline-block;
	margin: 16px 0 0;
	padding: 4px 16px;
	border: 3px solid var(--m-ink);
	border-radius: 999px;
	background: #fff;
	color: var(--m-ink);
	font-weight: 800;
	font-size: 0.95rem;
}
.masal-band a { text-decoration: underline; }

/* ==========================================================
   7. Masal ızgarası ve kartlar
   ========================================================== */
.masal-section { padding: 44px 0 64px; }
.masal-section-title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 28px;
	font-family: var(--m-head);
	font-weight: 700;
	font-size: 2rem;
	line-height: 1.2;
	color: var(--m-ink);
}
.masal-section-title::before {
	content: "";
	flex: none;
	width: 34px;
	height: 34px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 17l-6.1 3.4 1.5-6.8L2.2 9l6.9-.7z' fill='%23ffc933' stroke='%232b2358' stroke-width='1.8' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
.masal-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.masal-grid > li { margin: 0; padding: 0; min-width: 0; }
.masal-grid > .masal-ad-item { grid-column: 1 / -1; }

.masal-card {
	display: block;
	height: 100%;
	box-sizing: border-box;
	padding: 12px 12px 16px;
	background: #fff;
	border: 3px solid var(--m-ink);
	border-radius: 28px;
	box-shadow: 0 6px 0 var(--m-ink);
	transition: transform 0.2s cubic-bezier(0.3, 1.6, 0.5, 1), box-shadow 0.2s ease;
}
.masal-card:hover,
.masal-card:focus-within {
	transform: translateY(-4px) rotate(-0.8deg);
	box-shadow: 0 10px 0 var(--m-ink);
}
.masal-card-cover {
	display: block;
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: var(--c);
	border: 3px solid var(--c);
	border-radius: 18px;
}
.masal-card-cover img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 14px;
}
.masal-card-initial {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-family: var(--m-head);
	font-weight: 700;
	font-size: 5rem;
	color: var(--on);
}
.masal-card-title {
	margin: 14px 6px 8px;
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.4rem;
	line-height: 1.2;
	letter-spacing: 0;
	color: var(--m-ink);
}
.masal-card-title a:hover { color: var(--ct); }
.masal-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 12px;
	margin: 0 6px;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.4;
	color: var(--m-muted);
}
.masal-card-cat {
	padding: 3px 13px;
	border-radius: 14px;
	background: var(--c);
	color: var(--on) !important;
	font-weight: 800;
	font-size: 0.85rem;
	line-height: 1.3;
}
.masal-card-cat:hover { filter: brightness(0.95); text-decoration: underline; }

/* Sayfalama */
.masal-main .navigation.pagination { margin: 52px 0 0; }
.masal-main .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}
.masal-main .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 48px;
	height: 48px;
	padding: 0 16px;
	box-sizing: border-box;
	border: 3px solid var(--m-ink);
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 4px 0 var(--m-ink);
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.05rem;
	color: var(--m-ink);
	transition: transform 0.15s ease;
}
.masal-main .page-numbers.current { background: var(--m-purple); color: #fff; }
.masal-main .page-numbers.dots { border-color: transparent; background: transparent; box-shadow: none; }
.masal-main a.page-numbers:hover { background: var(--m-yellow); transform: translateY(-2px); }

/* ==========================================================
   8. Masal sayfası
   ========================================================== */
.masal-story-wrap {
	max-width: var(--m-read);
	margin-inline: auto;
	padding: 36px 20px 24px;
	box-sizing: border-box;
}
.masal-crumbs {
	margin: 0 0 18px;
	font-size: 0.92rem;
	font-weight: 700;
	color: var(--m-muted);
}
.masal-crumbs a:hover { text-decoration: underline; }
.masal-story-title {
	margin: 0 0 18px;
	font-family: var(--m-head);
	font-weight: 700;
	font-size: clamp(2.2rem, 5.2vw, 3.4rem);
	line-height: 1.1;
	letter-spacing: 0;
	color: var(--m-ink);
}
.masal-story-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 0 0 28px;
	font-size: 0.98rem;
	font-weight: 700;
	color: var(--m-muted);
}
.masal-pill {
	display: inline-block;
	padding: 5px 16px;
	border: 3px solid var(--m-ink);
	border-radius: 999px;
	background: var(--c);
	color: var(--on) !important;
	font-weight: 800;
	font-size: 0.92rem;
	line-height: 1.3;
	box-shadow: 0 3px 0 var(--m-ink);
}
.masal-story-figure {
	margin: 0 0 34px;
	border: 4px solid var(--m-ink);
	border-radius: 30px;
	overflow: hidden;
	background: var(--m-sky);
	box-shadow: 0 8px 0 var(--c, var(--m-ink));
}
.masal-story-figure img { display: block; width: 100%; height: auto; }

.masal-story {
	font-family: var(--m-body);
	font-size: 1.3rem;
	font-weight: 500;
	line-height: 1.85;
	color: var(--m-ink);
	overflow-wrap: break-word;
}
.masal-story > p { margin: 0 0 1.2em; }
.masal-story > p:first-of-type::first-letter {
	float: left;
	margin: 0.04em 0.1em 0 0;
	font-family: var(--m-head);
	font-size: 3.6em;
	line-height: 0.85;
	font-weight: 700;
	color: var(--ct, var(--m-purple));
}
.masal-story h2,
.masal-story h3 {
	margin: 1.7em 0 0.55em;
	font-family: var(--m-head);
	font-weight: 600;
	line-height: 1.2;
	color: var(--m-ink);
}
.masal-story h2 { font-size: 1.6em; }
.masal-story h3 { font-size: 1.3em; }
.masal-story a { color: var(--m-purple); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.masal-story img {
	display: block;
	margin: 1.4em auto;
	border: 3px solid var(--m-ink);
	border-radius: 22px;
}
.masal-story blockquote {
	margin: 1.5em 0;
	padding: 16px 22px;
	border: 3px solid var(--m-ink);
	border-radius: 22px;
	background: var(--m-yellow-soft);
	font-weight: 600;
}
.masal-story blockquote p { margin: 0; }
.masal-story audio { display: block; width: 100%; margin: 1.2em 0; }
.masal-story iframe,
.masal-story video {
	display: block;
	max-width: 100%;
	margin: 1.2em auto;
	border: 3px solid var(--m-ink);
	border-radius: 22px;
}

/* Sonraki / önceki masal */
.masal-next {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	margin: 44px 0 0;
}
.masal-next a {
	display: block;
	padding: 16px 20px;
	border: 3px solid var(--m-ink);
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 5px 0 var(--m-ink);
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.15rem;
	line-height: 1.3;
	color: var(--m-ink);
	transition: transform 0.15s ease, background 0.15s ease;
}
.masal-next a:hover { background: var(--m-yellow-soft); transform: translateY(-3px); }
.masal-next small {
	display: block;
	margin-bottom: 4px;
	font-family: var(--m-body);
	font-weight: 800;
	font-size: 0.85rem;
	color: var(--m-muted);
}
.masal-next .masal-next-right { text-align: right; grid-column: 2; }

.masal-more {
	margin-top: 52px;
	padding: 48px 0 64px;
	background: var(--m-sky);
	border-top: 3px solid var(--m-ink);
	border-bottom: 3px solid var(--m-ink);
}
.masal-comments {
	max-width: var(--m-read);
	margin-inline: auto;
	padding: 40px 20px 60px;
	box-sizing: border-box;
	font-family: var(--m-body);
}
.masal-comments h2,
.masal-comments h3 { font-family: var(--m-head); font-weight: 600; }
.masal-comments input[type="text"],
.masal-comments input[type="email"],
.masal-comments input[type="url"],
.masal-comments textarea {
	border: 3px solid var(--m-ink);
	border-radius: 16px;
	background: #fff;
}
html .masal-comments input[type="submit"] {
	padding: 12px 26px;
	border: 3px solid var(--m-ink);
	border-radius: 999px;
	background: var(--m-purple);
	box-shadow: 0 4px 0 var(--m-ink);
	color: #fff;
	font-family: var(--m-head);
	font-weight: 600;
	font-size: 1.05rem;
	cursor: pointer;
}
html .masal-comments input[type="submit"]:hover { background: #6a3df0; color: #fff; }

/* ==========================================================
   9. Reklam kutuları
   ========================================================== */
.masal-ad {
	clear: both;
	margin: 28px auto;
	text-align: center;
	min-height: 280px;            /* yer önceden ayrılır, sayfa zıplamaz */
	overflow: hidden;
	font-family: var(--m-body);
}
.masal-ad::before {
	content: "Reklam";
	display: block;
	margin-bottom: 6px;
	font-size: 0.75rem;
	font-weight: 700;
	color: #8a82b3;
}
.masal-ad-item .masal-ad { margin: 0 auto; }
.masal-ad-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 250px;
	border: 3px dashed #c9bdf5;
	border-radius: 22px;
	color: var(--m-muted);
	font-size: 0.92rem;
	font-weight: 700;
	background: #faf7ff;
}

/* ==========================================================
   10. Diğer sayfalar (GeneratePress şablonları: sayfa, 404 vb.)
   ========================================================== */
.masal-content > .content-area {
	width: 100%;
	max-width: 860px;
	margin-inline: auto;
	padding: 40px 20px 64px;
	box-sizing: border-box;
}
.masal-content > .content-area .inside-article {
	padding: 28px;
	border: 3px solid var(--m-ink);
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 6px 0 var(--m-ink);
}
.masal-content > .content-area h1,
.masal-content > .content-area h2,
.masal-content > .content-area h3 {
	font-family: var(--m-head);
	font-weight: 700;
	color: var(--m-ink);
}
.masal-content > .content-area .entry-content { font-size: 1.1rem; line-height: 1.8; }
.masal-content > .content-area .entry-content a { color: var(--m-purple); font-weight: 700; }

/* ==========================================================
   11. Küçük ekranlar
   ========================================================== */
@media (max-width: 1000px) {
	.masal-hero-inner { flex-direction: column; align-items: stretch; gap: 8px; }
	.masal-hero-text { flex: none; max-width: 560px; padding-bottom: 24px; }
	.masal-shelf { justify-content: flex-start; }
	.masal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
}

@media (max-width: 640px) {
	.masal-hero { padding-top: 32px; }
	.masal-hero::before { background-size: 70px 70px, 90px 45px, 0 0, 0 0, 0 0, 0 0; }

	/* telefonda kitaplar üst üste yatar */
	.masal-shelf {
		flex-direction: column;
		align-items: flex-start;
		gap: 6px;
		padding: 0;
	}
	.masal-shelf li,
	.masal-shelf li:nth-child(n) { width: 100%; transform: none; margin-right: 0; }
	.masal-shelf li .masal-spine,
	.masal-shelf li:nth-child(n) .masal-spine {
		writing-mode: horizontal-tb;
		width: 100%;
		height: 50px;
		padding: 0 14px 0 30px;
		border-radius: 8px 18px 18px 8px;
		font-size: 1.1rem;
		box-shadow: inset 12px 0 0 rgba(0, 0, 0, 0.12);
	}
	.masal-spine::before { left: 12px; right: auto; top: 10px; bottom: 10px; width: 7px; height: auto; }
	.masal-spine > span:first-child { padding: 0; text-align: left; white-space: nowrap; }
	.masal-shelf li:nth-child(4n+2) .masal-spine { width: 93%; }
	.masal-shelf li:nth-child(4n+3) .masal-spine { width: 97%; }
	.masal-shelf li:nth-child(4n+4) .masal-spine { width: 89%; }
	.masal-spine:hover,
	.masal-spine:focus-visible { transform: translateX(8px); }

	/* kartlar: solda kapak, sağda başlık */
	.masal-grid { grid-template-columns: 1fr; gap: 24px; }
	.masal-card {
		display: grid;
		grid-template-columns: 120px 1fr;
		column-gap: 14px;
		align-items: center;
		padding: 10px;
		border-radius: 22px;
	}
	.masal-card-cover { grid-row: 1 / span 2; border-radius: 14px; }
	.masal-card-title { margin: 0 0 6px; font-size: 1.15rem; align-self: end; }
	.masal-card-meta { margin: 0; align-self: start; }
	.masal-card-initial { font-size: 3rem; }

	.masal-section { padding: 30px 0 48px; }
	.masal-section-title { font-size: 1.6rem; }
	.masal-band { padding: 32px 0 46px; }
	.masal-story { font-size: 1.2rem; line-height: 1.8; }
	.masal-story-wrap { padding-top: 24px; }
	.masal-next { grid-template-columns: 1fr; }
	.masal-next .masal-next-right { grid-column: 1; text-align: left; }
	.masal-ad { min-height: 250px; margin: 22px auto; }
}

@media (prefers-reduced-motion: reduce) {
	.masal-spine,
	.masal-card,
	.masal-next a,
	.masal-main .page-numbers { transition: none; }
	.masal-card:hover,
	.masal-card:focus-within { transform: none; }
}
