/* Standalone Persian game manual — readable outside the old popup chrome */
body.manual-page {
	margin: 0;
	min-height: 100vh;
	height: auto !important;
	overflow-x: auto !important;
	overflow-y: auto !important;
	background:
		radial-gradient(1200px 600px at 80% -10%, rgba(90, 130, 70, 0.35), transparent 55%),
		linear-gradient(165deg, #1a2a1c 0%, #2d4a32 45%, #1e3224 100%) !important;
	background-image: none !important;
	color: #1a2418 !important;
	font-family: "Vazirmatn", Tahoma, sans-serif !important;
	min-width: 0 !important;
}

html:has(body.manual-page) {
	height: auto;
	overflow-y: auto;
}

body.manual-page * {
	box-sizing: border-box;
}

.manual-shell {
	max-width: 760px;
	margin: 0 auto;
	padding: 20px 16px 40px;
}

.manual-top {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.manual-brand {
	font-size: 22px;
	font-weight: 700;
	color: #f4efe4 !important;
	text-decoration: none;
}

.manual-topnav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
}

.manual-topnav a {
	color: #dce8d4 !important;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 8px;
	border-radius: 6px;
	background: rgba(255,255,255,0.08);
}

.manual-topnav a:hover {
	background: rgba(255,255,255,0.16);
	color: #fff !important;
}

.manual-panel {
	background-color: #fffdf8 !important;
	background-image: linear-gradient(180deg, #fffdf8, #f3eee3) !important;
	border: 1px solid rgba(45, 74, 50, 0.22);
	border-radius: 14px;
	box-shadow: 0 16px 40px rgba(0,0,0,0.28);
	padding: 22px 24px 18px;
	color: #1a2418 !important;
}

.manual-title {
	margin: 0 0 14px;
	font-size: 22px;
	font-weight: 700;
	color: #1e3224 !important;
	border-bottom: 1px solid rgba(45, 74, 50, 0.15);
	padding-bottom: 10px;
}

.manual-body {
	color: #1a2418 !important;
	line-height: 1.75;
	font-size: 14px;
}

.manual-body h1 {
	display: none; /* page title already shown */
}

.manual-body,
.manual-body p,
.manual-body li,
.manual-body a,
.manual-body td,
.manual-body th,
.manual-body div {
	color: #1a2418 !important;
}

.manual-body a {
	color: #2d4a32 !important;
	font-weight: 600;
	text-decoration: none;
}

.manual-body a:hover {
	color: #1e3224 !important;
	text-decoration: underline;
}

.manual-body ul {
	margin: 8px 0 14px;
	padding: 0 18px 0 0;
	list-style: disc;
}

.manual-body li {
	margin: 4px 0;
}

.manual-index {
	display: grid;
	gap: 16px;
}

.manual-card {
	padding: 12px 14px;
	border-radius: 10px;
	background: rgba(45, 74, 50, 0.06);
	border: 1px solid rgba(45, 74, 50, 0.12);
}

.manual-card h2 {
	margin: 0 0 8px;
	font-size: 16px;
	color: #1e3224 !important;
}

.manual-card ul {
	margin: 0;
}

.manual-lead {
	margin: 0 0 12px;
	color: #2a3326 !important;
}

.manual-body table {
	width: 100%;
	border-collapse: collapse;
	margin: 10px 0;
	background: #fff !important;
}

.manual-body table th,
.manual-body table td {
	border: 1px solid rgba(45, 74, 50, 0.15);
	padding: 6px 8px;
	color: #1a2418 !important;
	background: #fff !important;
	text-align: center;
	vertical-align: middle;
}

.manual-body table#troop_details {
	width: 100%;
	float: none !important;
}

.manual-body table#troop_info {
	float: none !important;
	width: 100% !important;
	margin: 10px 0 !important;
}

.manual-body img#big_unit,
.manual-body img.building {
	float: none !important;
	display: block;
	margin: 8px auto;
	max-width: 180px;
}

.manual-body #t_desc,
.manual-body #prereqs {
	margin-top: 12px;
	clear: both;
}

.manual-body map,
.manual-body img.navi,
.manual-body img.troops,
.manual-body img.buildings,
.manual-body img.point,
.manual-body img.external {
	display: none !important;
}

.manual-footer-nav {
	margin-top: 18px;
	padding-top: 12px;
	border-top: 1px solid rgba(45, 74, 50, 0.12);
	font-size: 13px;
}

.manual-footer-nav a {
	color: #2d4a32 !important;
	font-weight: 600;
	text-decoration: none;
}

.manual-footer-nav .sep {
	margin: 0 8px;
	color: #8a9480;
}

@media (max-width: 640px) {
	.manual-shell { padding: 12px 10px 28px; }
	.manual-panel { padding: 16px; }
}
